Commit ed769dd6 authored by Alain Takoudjou's avatar Alain Takoudjou

librecipe/filehash: remove duplicated import on hashlib

parent 9dac0938
......@@ -52,15 +52,13 @@ def filehash(filename, type_=DEFAULT_HASH):
def generateHashFromFiles(file_list):
import hashlib
hasher = hashlib.md5()
for path in file_list:
with open(path, 'rb') as afile:
buf =
hasher.update(b"%u\n" % len(buf))
hash = hasher.hexdigest()
return hash
return hasher.hexdigest()
# Home made hashdeep <>
def dirhash(dirname, type_=DEFAULT_HASH):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment