FIX StringIO

This commit is contained in:
Raimon Esteve 2017-01-25 18:42:49 +01:00
parent 0c061a7a78
commit afc4cab167
1 changed files with 2 additions and 2 deletions

View File

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