FIX StringIO

This commit is contained in:
Raimon Esteve 2017-01-25 18:42:49 +01:00
parent 0c061a7a78
commit afc4cab167

View file

@ -260,7 +260,7 @@ class CSVArchive(Workflow, ModelSQL, ModelView):
quote = profile.csv_quote quote = profile.csv_quote
header = profile.csv_header header = profile.csv_header
data = StringIO(archive.data) data = StringIO.StringIO(archive.data)
try: try:
rows = reader(data, delimiter=str(separator), rows = reader(data, delimiter=str(separator),
quotechar=str(quote)) quotechar=str(quote))
@ -272,7 +272,7 @@ class CSVArchive(Workflow, ModelSQL, ModelView):
raise_exception=False), raise_exception=False),
)}) )})
return return
data.close()
if header: # TODO. Know why some header columns get "" if header: # TODO. Know why some header columns get ""
headers = [filter(lambda x: x in string.printable, x headers = [filter(lambda x: x in string.printable, x
).replace('"', '') ).replace('"', '')