Skip to content

Commit

Permalink
reverted import/exporet change that breaks python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
mdipierro committed Aug 6, 2018
1 parent 6185a34 commit 70929a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pydal/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ def import_from_csv_file(self, ifile, id_map=None, null='<NULL>',
id_offset = {} # only used if id_map is None
map_tablenames = map_tablenames or {}
for line in ifile:
line = line.decode().strip()
line = line.strip()
if not line:
continue
elif line == 'END':
Expand Down
4 changes: 2 additions & 2 deletions pydal/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,8 +924,8 @@ def import_from_csv_file(self,
if restore:
self._db[self].truncate()

csvfile = csvfile.read().decode()
reader = csv.reader(csvfile, delimiter=delimiter,quotechar=quotechar, quoting=quoting)
reader = csv.reader(csvfile, delimiter=delimiter,
quotechar=quotechar, quoting=quoting)
colnames = None
if isinstance(id_map, dict):
if self._tablename not in id_map:
Expand Down

0 comments on commit 70929a6

Please sign in to comment.