mirror of https://github.com/explosion/spaCy.git
py3 compatibility
This commit is contained in:
parent
7627969aba
commit
3a50448bf3
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue