Skip to content

Commit

Permalink
trivial: Fix a few linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ximion committed Oct 19, 2024
1 parent a150c36 commit 1ffbff7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/laniakea/dud.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ def validate_checksums(self, check_hash='sha256'):
hash_type = hashlib.md5()
checksums = self.get('Files')
field_name = 'md5sum'
else:
raise DudFileException('Unknown checksum hash type found for %s: %s' % (filename, check_hash))

changed_files = None
for cf in checksums:
Expand Down
1 change: 1 addition & 0 deletions src/lkarchive/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ def _verify_hashes(
with open(local_fname, 'rb') as f:
# pylint: disable=not-an-iterable
for hash in Hashes(f).hashes: # type: ignore
hash_okay = False
if hash.hashtype == 'MD5Sum':
hash_okay = file.md5sum == hash.hashvalue
elif hash.hashtype == 'SHA1':
Expand Down

0 comments on commit 1ffbff7

Please sign in to comment.