Added debug message that logs borg version for every config #792

Merged
witten merged 2 commits from :main into main 2023-11-25 03:59:40 +00:00
1 changed files with 1 additions and 0 deletions

View File

@ -75,6 +75,7 @@ def run_configuration(config_filename, config, arguments):
try:
local_borg_version = borg_version.local_borg_version(config, local_path)
logger.debug(f'{config_filename}: Borg {local_borg_version}')
except (OSError, CalledProcessError, ValueError) as error:
yield from log_error_records(f'{config_filename}: Error getting local Borg version', error)

This should probably just be a logger.debug() or logger.info() call since it's not an error...? Unfortunately though such a change would obsolete some of your laborious test work. But the good news is it might actually make your test changes easier to mock.

Let me know your thoughts.

This should probably just be a `logger.debug()` or `logger.info()` call since it's not an error...? Unfortunately though such a change would obsolete some of your laborious test work. But the good news is it might actually make your test changes easier to mock. Let me know your thoughts.

Yes that does indeed make a lot of sense and explains why the unit tests were such a pain.

Yes that does indeed make a lot of sense and explains why the unit tests were such a pain.

Fixed now

Fixed now
return