]> git.ipfire.org Git - pbs.git/commitdiff
Drop calc_hash1
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 24 Oct 2017 20:30:51 +0000 (21:30 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 24 Oct 2017 20:30:51 +0000 (21:30 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/misc.py
src/buildservice/uploads.py

index 5808951466234ae37c938e6f32a7088bd8269256..018e953e228663c899d64008faad49bd703dcd8a 100644 (file)
@@ -92,11 +92,6 @@ def calc_hash(filename, algo="sha512"):
 
        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):
index af67b9164b018233244d4cf00ff6fb7eee1bea28..7c43aa541add3b92d4f884b1aa44375855af8490 100644 (file)
@@ -139,7 +139,7 @@ class Upload(base.DataObject):
                        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))