mirror of
https://github.com/ciromattia/kcc
synced 2026-06-22 22:35:23 +00:00
Revert "huge speed optimization on HDD by removing md5 (#845)"
This reverts commit 01625904d1.
This commit is contained in:
@@ -75,6 +75,16 @@ def walkLevel(some_dir, level=1):
|
||||
del dirs[:]
|
||||
|
||||
|
||||
def md5Checksum(fpath):
|
||||
with open(fpath, 'rb') as fh:
|
||||
m = md5()
|
||||
while True:
|
||||
data = fh.read(8192)
|
||||
if not data:
|
||||
break
|
||||
m.update(data)
|
||||
return m.hexdigest()
|
||||
|
||||
|
||||
def sanitizeTrace(traceback):
|
||||
return ''.join(format_tb(traceback))\
|
||||
|
||||
Reference in New Issue
Block a user