summaryrefslogtreecommitdiff
path: root/namegen.py
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2017-11-16 22:15:16 +0100
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2017-11-16 22:15:16 +0100
commitde2e190367e3b4ce34604646959695c0b7e2accb (patch)
tree2e4c816fa67f58d8835585cf68c4c4cbd6831063 /namegen.py
parent8eff4b8416ab3be073d9cedc397581f66397525e (diff)
py3 encoding/str/bytes fixes
Diffstat (limited to 'namegen.py')
-rwxr-xr-xnamegen.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/namegen.py b/namegen.py
index a07ca16..f7aa00f 100755
--- a/namegen.py
+++ b/namegen.py
@@ -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: