Fix pokedex dump under Python 2

This commit is contained in:
Eevee (Lexy Munroe) 2015-11-04 20:03:08 -08:00
parent 0ff24b4dc8
commit e0f4d3be7a

View file

@ -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.