]> git.ipfire.org Git - pbs.git/blobdiff - src/buildservice/uploads.py
uploads: Log any incorrect digests
[pbs.git] / src / buildservice / uploads.py
index e5b9c9a7433713881e84e8f7200f3da9eecd4c60..56f8c1584bd0a5a8ef7c2cf6df7eb5b7d1bcdc54 100644 (file)
@@ -267,6 +267,10 @@ class Upload(base.DataObject):
 
                                # Check that the digest matches
                                if not hmac.compare_digest(computed_digest, self.digest):
+                                       log.error("Upload %s had an incorrect digest:" % self)
+                                       log.error("  Expected: %s" % self.digest.hex())
+                                       log.error("  Got     : %s" % computed_digest.hex())
+
                                        raise ValueError("Invalid digest")
 
                        # If there has been any kind of exception, we want to delete the temporary file