mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Fix pokedex dump
under Python 2
This commit is contained in:
parent
0ff24b4dc8
commit
e0f4d3be7a
1 changed files with 2 additions and 2 deletions
|
@ -402,9 +402,9 @@ def dump(session, tables=[], directory=None, verbose=False, langs=None):
|
||||||
else:
|
else:
|
||||||
filename = '%s/%s.csv' % (directory, table_name)
|
filename = '%s/%s.csv' % (directory, table_name)
|
||||||
|
|
||||||
writer = csv.writer(io.open(filename, 'w', newline=''), lineterminator='\n')
|
writer = csv.writer(io.open(filename, 'wb'), lineterminator='\n')
|
||||||
|
|
||||||
columns = [col.name for col in table.columns]
|
columns = [col.name.encode('utf8') for col in table.columns]
|
||||||
|
|
||||||
# For name tables, always dump rows for official languages, as well as
|
# For name tables, always dump rows for official languages, as well as
|
||||||
# for those in `langs` if specified.
|
# for those in `langs` if specified.
|
||||||
|
|
Loading…
Reference in a new issue