Skip to content

Commit

Permalink
mysqldump_to_csv: edgecase where last row starts with bracket (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtmail authored Jul 21, 2023
1 parent c9e6f65 commit a757a2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/mysqldump_to_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def parse_values(values, outfile):
# as:
# 1) the previous entry ended in a )
# 2) the current entry starts with a (
if latest_row[-1][-1] == ")":
if (latest_row[-1] and latest_row[-1][-1] == ")"):
# Remove the close paren.
latest_row[-1] = latest_row[-1][:-1]
new_row = True
Expand Down

0 comments on commit a757a2e

Please sign in to comment.