Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
return h.hexdigest()
-def calc_hash1(filename):
- # XXX COMPAT FUNCTION
- # to be removed
- return calc_hash(filename, "sha1")
-
def guess_filetype(filename):
# XXX very cheap check. Need to do better here.
if tarfile.is_tarfile(filename):
return False
# Calculate a hash to validate the upload.
- hash = misc.calc_hash1(self.path)
+ hash = misc.calc_hash(self.path, "sha1")
if not self.hash == hash:
logging.error("Hash did not match: %s != %s" % (self.hash, hash))