Skip to content

Commit

Permalink
Merge pull request OCA#24 from waveyeung/8.0
Browse files Browse the repository at this point in the history
Update base_import_async.py
  • Loading branch information
lmignon committed Nov 19, 2015
2 parents 47ff86b + c58fd53 commit 6054de2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ install:
- git clone https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
- travis_install_nightly
- git clone https://github.com/OCA/connector -b ${VERSION} $HOME/connector

script:
- travis_run_tests
Expand Down
8 changes: 4 additions & 4 deletions base_import_async/models/base_import_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ def _create_csv_attachment(session, fields, data, options, file_name):
# write csv
f = StringIO()
writer = csv.writer(f,
delimiter=options.get(OPT_SEPARATOR),
quotechar=options.get(OPT_QUOTING))
delimiter=str(options.get(OPT_SEPARATOR)),
quotechar=str(options.get(OPT_QUOTING)))
encoding = options.get(OPT_ENCODING, 'utf-8')
writer.writerow(_encode(fields, encoding))
for row in data:
Expand All @@ -79,8 +79,8 @@ def _read_csv_attachment(session, att_id, options):
att = session.env['ir.attachment'].browse(att_id)
f = StringIO(att.datas.decode('base64'))
reader = csv.reader(f,
delimiter=options.get(OPT_SEPARATOR),
quotechar=options.get(OPT_QUOTING))
delimiter=str(options.get(OPT_SEPARATOR)),
quotechar=str(options.get(OPT_QUOTING)))
encoding = options.get(OPT_ENCODING, 'utf-8')
fields = _decode(reader.next(), encoding)
data = [_decode(row, encoding) for row in reader]
Expand Down
1 change: 1 addition & 0 deletions oca_dependencies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
connector

0 comments on commit 6054de2

Please sign in to comment.