parent
0f4ebfa4fa
commit
539c277bd8
@ -48,7 +48,7 @@ IGNORED_FILE_SYSTEM_ERRORS = {errno.ENOENT, errno.EACCES}
|
|||||||
|
|
||||||
def sha1(path, chunk_size):
|
def sha1(path, chunk_size):
|
||||||
digest = hashlib.sha1()
|
digest = hashlib.sha1()
|
||||||
with open(path) as f:
|
with open(path, 'rb') as f:
|
||||||
d = f.read(chunk_size)
|
d = f.read(chunk_size)
|
||||||
while d:
|
while d:
|
||||||
digest.update(d)
|
digest.update(d)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user