Fix csv change

This commit is contained in:
2023-05-05 00:03:25 +02:00
parent 3b7a28cc23
commit df3066ebfe
2 changed files with 5 additions and 4 deletions

View File

@ -139,9 +139,10 @@ def main() -> None:
cols = [t[0] for t in cur.description]
with utils.csv_open(f'{args.output}/{t_name}.csv') as f:
f.header(cols)
f.header(*cols)
for row in cur:
f.row((utils.convert_value(val, table=t_name, column=col) for col, val in zip(cols, row)), raw=True)
values = (utils.convert_value(val, table=t_name, column=col) for col, val in zip(cols, row))
f.row(*values, raw=True)
print(f'Exported {t_name} successfully!', flush=True)
finally: