Browse Source

[FIX] account_export_csv - csv writer doesn't take generator use of list comprehension instead

pull/756/head
Yannick Vaucher 11 years ago
committed by Kévin Roche
parent
commit
942e7eaa54
  1. 2
      account_export_csv/wizard/account_export_csv.py

2
account_export_csv/wizard/account_export_csv.py

@ -51,7 +51,7 @@ class AccountUnicodeWriter(object):
#we ensure that we do not try to encode none or bool
row = (x or u'' for x in row)
encoded_row = (c.encode("utf-8") if isinstance(c, unicode) else c for c in row)
encoded_row = [c.encode("utf-8") if isinstance(c, unicode) else c for c in row]
self.writer.writerow(encoded_row)
# Fetch UTF-8 output from the queue ...

Loading…
Cancel
Save