Skip to content

Commit 70929a6

Browse files
committed
reverted import/exporet change that breaks python 3
1 parent 6185a34 commit 70929a6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pydal/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ def import_from_csv_file(self, ifile, id_map=None, null='<NULL>',
860860
id_offset = {} # only used if id_map is None
861861
map_tablenames = map_tablenames or {}
862862
for line in ifile:
863-
line = line.decode().strip()
863+
line = line.strip()
864864
if not line:
865865
continue
866866
elif line == 'END':

pydal/objects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,8 +924,8 @@ def import_from_csv_file(self,
924924
if restore:
925925
self._db[self].truncate()
926926

927-
csvfile = csvfile.read().decode()
928-
reader = csv.reader(csvfile, delimiter=delimiter,quotechar=quotechar, quoting=quoting)
927+
reader = csv.reader(csvfile, delimiter=delimiter,
928+
quotechar=quotechar, quoting=quoting)
929929
colnames = None
930930
if isinstance(id_map, dict):
931931
if self._tablename not in id_map:

0 commit comments

Comments
 (0)