From 57eb6068df5f943ea98584281bd1dccd7babb4e6 Mon Sep 17 00:00:00 2001 From: Fredrik Erlandsson Date: Sun, 31 Jul 2022 21:27:47 +0200 Subject: [PATCH] change messaging for checksums --- elodie/filesystem.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/elodie/filesystem.py b/elodie/filesystem.py index 92d7807e..7058d9d2 100644 --- a/elodie/filesystem.py +++ b/elodie/filesystem.py @@ -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, @@ -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)