Skip to content

Commit

Permalink
Fix encoding error on Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmogar committed Jun 27, 2017
1 parent 97274f7 commit 04b9bef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cucco/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def process_file(self, path):

with open(output_path, 'w') as file:
for line in lines_generator(path):
file.write('%s\n' % self._cucco.normalize(line.decode('utf-8')))
file.write('%s\n' % self._cucco.normalize(
line.encode().decode('utf-8')))

self._logger.debug('Created file "%s"', output_path)

Expand Down

0 comments on commit 04b9bef

Please sign in to comment.