This commit is contained in:
A. Murat Eren
2006-02-10 10:32:33 +00:00
parent 8f5fc0efed
commit d922d2f073
+1 -4
View File
@@ -373,10 +373,7 @@ def copy_dir(src, dest):
def check_file_hash(filename, hash): def check_file_hash(filename, hash):
"""Check the files integrity with a given hash""" """Check the files integrity with a given hash"""
if sha1_file(filename) == hash: return sha1_file(filename) == hash
return True
return False
def sha1_file(filename): def sha1_file(filename):
"""calculate sha1 hash of filename""" """calculate sha1 hash of filename"""