Skip to content

Commit

Permalink
re-reduce scope of try/catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
a-detiste committed Nov 24, 2024
1 parent b97c64f commit 6e08f36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/canmatrix/formats/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ def dump(db, file_object, delimiter=',', **options):
# loop over signals ends here
# loop over frames ends here

import io
temp = io.TextIOWrapper(file_object, encoding='UTF-8')

try:
import io
temp = io.TextIOWrapper(file_object, encoding='UTF-8')

writer = csv.writer(temp, delimiter=delimiter)
for csv_row in csv_table:
writer.writerow(csv_row.as_list)
Expand Down

0 comments on commit 6e08f36

Please sign in to comment.