Skip to content

Commit

Permalink
md5: python2.5 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
almiheenko authored and alexeigurevich committed Feb 6, 2018
1 parent add0e74 commit 1f2766b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions quast_libs/qutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,9 @@ def is_ascii_string(line):
def md5(fname):
hash_md5 = hashlib.md5()
with open(fname, 'rb') as f:
for chunk in iter(lambda: f.read(65536), b""):
hash_md5.update(chunk)
while True:
buf = f.read(8192)
if not buf:
break
hash_md5.update(buf)
return hash_md5.hexdigest()

0 comments on commit 1f2766b

Please sign in to comment.