From 3a50448bf30f16d0022c0ca38227cee5bb8ba2e8 Mon Sep 17 00:00:00 2001 From: Henning Peters Date: Fri, 5 Feb 2016 15:43:50 +0100 Subject: [PATCH] py3 compatibility --- bin/cythonize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cythonize.py b/bin/cythonize.py index ca039d81a..8b5f60376 100755 --- a/bin/cythonize.py +++ b/bin/cythonize.py @@ -88,11 +88,11 @@ def load_hashes(filename): def save_hashes(hash_db, filename): - json.dump(hash_db, open(filename, 'w')) + json.dump(hash_db, open(filename, 'wb')) def get_hash(path): - return hashlib.md5(open(path).read()).hexdigest() + return hashlib.md5(open(path, 'rb').read()).hexdigest() def hash_changed(base, path, db):