Skip to content

Instantly share code, notes, and snippets.

@daviddavis
Created March 5, 2021 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daviddavis/2e6ab1872d97230d144a6cd1f9d05e31 to your computer and use it in GitHub Desktop.
Save daviddavis/2e6ab1872d97230d144a6cd1f9d05e31 to your computer and use it in GitHub Desktop.
diff --git a/pulpcore/download/base.py b/pulpcore/download/base.py
index 69472115e..013e43990 100644
--- a/pulpcore/download/base.py
+++ b/pulpcore/download/base.py
@@ -193,6 +193,8 @@ class BaseDownloader:
if self.expected_digests:
for algorithm, expected_digest in self.expected_digests.items():
if expected_digest != self._digests[algorithm].hexdigest():
+ digest = self._digests[algorithm].hexdigest()
+ log.warn(f"Received checksum {digest} for {self.url} but expected {expected_digest}")
raise DigestValidationError()
def validate_size(self):
@dralley
Copy link

dralley commented Mar 18, 2021

@daviddavis we should put this in core, it seems like the DigestValidationError sometimes gets swallowed up.

@daviddavis
Copy link
Author

agreed. I filed a task for it https://pulp.plan.io/issues/8357

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment