From c940d9941a3c6d514df7eed452913680135a98cf Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 21 Mar 2019 00:23:43 -0400 Subject: [PATCH] python3: make kakasi build Since these are all being opened as non-binary, it makes no sense to then immediately decode them. --- setup/resources.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/resources.py b/setup/resources.py index 3d63baf68a..6fc5cf92e5 100644 --- a/setup/resources.py +++ b/setup/resources.py @@ -168,7 +168,7 @@ class Kakasi(Command): # {{{ def mkitaiji(self, src, dst): dic = {} for line in open(src, "r"): - line = line.decode("utf-8").strip() + line = line.strip() if line.startswith(';;'): # skip comment continue if re.match(r"^$",line): @@ -182,7 +182,7 @@ class Kakasi(Command): # {{{ def mkkanadict(self, src, dst): dic = {} for line in open(src, "r"): - line = line.decode("utf-8").strip() + line = line.strip() if line.startswith(';;'): # skip comment continue if re.match(r"^$",line): @@ -194,7 +194,7 @@ class Kakasi(Command): # {{{ f.write(msgpack_dumps(dic)) def parsekdict(self, line): - line = line.decode("utf-8").strip() + line = line.strip() if line.startswith(';;'): # skip comment return (yomi, kanji) = line.split(' ')