diff --git a/bin/mysqldump_to_csv.py b/bin/mysqldump_to_csv.py index 972b7c1..fb51f55 100755 --- a/bin/mysqldump_to_csv.py +++ b/bin/mysqldump_to_csv.py @@ -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