Sfoglia il codice sorgente

Fix regression in which the "transfer" action produced a traceback (#663).

Dan Helfman 2 anni fa
parent
commit
5f595f7ac3
3 ha cambiato i file con 4 aggiunte e 3 eliminazioni
  1. 1 0
      NEWS
  2. 2 2
      borgmatic/actions/transfer.py
  3. 1 1
      tests/unit/actions/test_transfer.py

+ 1 - 0
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.

+ 2 - 2
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,

+ 1 - 1
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,