Don't strip \r\n from "Download as CSV" batches of rows, as it leads to malformed data. Fixes #1936

This commit is contained in:
Dave Page 2016-11-07 16:46:26 +02:00
parent 7f940bb13a
commit ca333ea6a7

View File

@ -624,7 +624,7 @@ WHERE
csv_writer.writeheader()
csv_writer.writerows(results)
yield res_io.getvalue().strip(str('\r\n'))
yield res_io.getvalue()
while True:
results = cur.fetchmany(records)
@ -639,7 +639,7 @@ WHERE
res_io, fieldnames=header, delimiter=str(','), quoting=csv.QUOTE_NONNUMERIC
)
csv_writer.writerows(results)
yield res_io.getvalue().strip(str('\r\n'))
yield res_io.getvalue()
return True, gen