From 5f595f7ac3fbfc8c19694baaa8b08e613b60a98b Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Thu, 30 Mar 2023 23:21:20 -0700 Subject: [PATCH] Fix regression in which the "transfer" action produced a traceback (#663). --- NEWS | 1 + borgmatic/actions/transfer.py | 4 ++-- tests/unit/actions/test_transfer.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 7f2353d..8ffbbde 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ 1.7.11.dev0 * #662: Fix regression in which "check_repositories" option failed to match repositories. + * #663: Fix regression in which the "transfer" action produced a traceback. 1.7.10 * #396: When a database command errors, display and log the error message instead of swallowing it. diff --git a/borgmatic/actions/transfer.py b/borgmatic/actions/transfer.py index 628f273..8089fd4 100644 --- a/borgmatic/actions/transfer.py +++ b/borgmatic/actions/transfer.py @@ -17,10 +17,10 @@ def run_transfer( ''' Run the "transfer" action for the given repository. ''' - logger.info(f'{repository}: Transferring archives to repository') + logger.info(f'{repository["path"]}: Transferring archives to repository') borgmatic.borg.transfer.transfer_archives( global_arguments.dry_run, - repository, + repository['path'], storage, local_borg_version, transfer_arguments, diff --git a/tests/unit/actions/test_transfer.py b/tests/unit/actions/test_transfer.py index cc9f138..58d8a16 100644 --- a/tests/unit/actions/test_transfer.py +++ b/tests/unit/actions/test_transfer.py @@ -10,7 +10,7 @@ def test_run_transfer_does_not_raise(): global_arguments = flexmock(monitoring_verbosity=1, dry_run=False) module.run_transfer( - repository='repo', + repository={'path': 'repo'}, storage={}, local_borg_version=None, transfer_arguments=transfer_arguments,