Skip to content

Commit

Permalink
change messaging for checksums
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrike committed Aug 1, 2022
1 parent 3364931 commit 57eb606
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions elodie/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,11 +499,11 @@ def process_checksum(self, _file, allow_duplicate):
checksum_file = db.get_hash(checksum)
if(allow_duplicate is False and checksum_file is not None):
if(os.path.isfile(checksum_file)):
log.info('%s already at %s.' % (
log.warn('%s already at %s.' % (
_file,
checksum_file
))
return None
return -1
else:
log.info('%s matched checksum but file not found at %s.' % ( # noqa
_file,
Expand All @@ -528,6 +528,8 @@ def process_file(self, _file, destination, media, **kwargs):
return

checksum = self.process_checksum(_file, allow_duplicate)
if(checksum == -1):
return
if(checksum is None):
log.info('Original checksum returned None for %s. Skipping...' %
_file)
Expand Down

0 comments on commit 57eb606

Please sign in to comment.