mirror of
https://github.com/NaN-tic/trytond-csv_import.git
synced 2023-12-14 02:02:55 +01:00
FIX StringIO
This commit is contained in:
parent
0c061a7a78
commit
afc4cab167
1 changed files with 2 additions and 2 deletions
|
@ -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('"', '')
|
||||
|
|
Loading…
Reference in a new issue