diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2017-11-16 22:15:16 +0100 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2017-11-16 22:15:16 +0100 |
commit | de2e190367e3b4ce34604646959695c0b7e2accb (patch) | |
tree | 2e4c816fa67f58d8835585cf68c4c4cbd6831063 | |
parent | 8eff4b8416ab3be073d9cedc397581f66397525e (diff) |
py3 encoding/str/bytes fixes
-rwxr-xr-x | namegen.py | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -96,7 +96,6 @@ class Stats: """Calculate stats from a list of names in a file-like object.""" for name in fp.readlines(): - name = name.decode('utf-8') for i in range(min(self.context, len(name))): self._increment_stats(name[0:i], name[i]) for i in range(self.context, len(name)): @@ -189,7 +188,7 @@ def main(): fp.close() try: - fp = open(opt.save_stats, 'wb') + fp = open(opt.save_stats, 'w') except TypeError: pass except IOError: |