py3 compatibility

This commit is contained in:
Henning Peters 2016-02-05 15:43:50 +01:00
parent 7627969aba
commit 3a50448bf3
1 changed files with 2 additions and 2 deletions

View File

@ -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):