Divyansh Singh 2 роки тому
батько
коміт
d6dfb8753a

+ 1 - 7
borgmatic/actions/compact.py

@@ -52,13 +52,7 @@ def run_compact(
             threshold=compact_arguments.threshold,
             threshold=compact_arguments.threshold,
         )
         )
     else:  # pragma: nocover
     else:  # pragma: nocover
-<<<<<<< HEAD
-        logger.info(
-            '{}: Skipping compact (only available/needed in Borg 1.2+)'.format(repository['path'])
-        )
-=======
-        logger.info(f'{repository}: Skipping compact (only available/needed in Borg 1.2+)')
->>>>>>> f42890430c59a40a17d9a68a193d6a09674770cb
+        logger.info(f'{repository["path"]}: Skipping compact (only available/needed in Borg 1.2+)')
     borgmatic.hooks.command.execute_hook(
     borgmatic.hooks.command.execute_hook(
         hooks.get('after_compact'),
         hooks.get('after_compact'),
         hooks.get('umask'),
         hooks.get('umask'),

+ 3 - 1
borgmatic/actions/export_tar.py

@@ -22,7 +22,9 @@ def run_export_tar(
     if export_tar_arguments.repository is None or borgmatic.config.validate.repositories_match(
     if export_tar_arguments.repository is None or borgmatic.config.validate.repositories_match(
         repository, export_tar_arguments.repository
         repository, export_tar_arguments.repository
     ):
     ):
-        logger.info(f'{repository["path"]}: Exporting archive {export_tar_arguments.archive} as tar file')
+        logger.info(
+            f'{repository["path"]}: Exporting archive {export_tar_arguments.archive} as tar file'
+        )
         borgmatic.borg.export_tar.export_tar_archive(
         borgmatic.borg.export_tar.export_tar_archive(
             global_arguments.dry_run,
             global_arguments.dry_run,
             repository['path'],
             repository['path'],

+ 3 - 1
borgmatic/actions/restore.py

@@ -255,7 +255,9 @@ def run_restore(
     ):
     ):
         return
         return
 
 
-    logger.info(f'{repository["path"]}: Restoring databases from archive {restore_arguments.archive}')
+    logger.info(
+        f'{repository["path"]}: Restoring databases from archive {restore_arguments.archive}'
+    )
 
 
     borgmatic.hooks.dispatch.call_hooks_even_if_unconfigured(
     borgmatic.hooks.dispatch.call_hooks_even_if_unconfigured(
         'remove_database_dumps',
         'remove_database_dumps',

+ 1 - 1
borgmatic/commands/borgmatic.py

@@ -169,7 +169,7 @@ def run_configuration(config_filename, config, arguments):
             return
             return
 
 
         encountered_error = error
         encountered_error = error
-        yield from log_error_records(f'{repository_path}: Error pinging monitor', error)
+        yield from log_error_records(f'{repository["path"]}: Error pinging monitor', error)
 
 
     if not encountered_error:
     if not encountered_error:
         try:
         try:

+ 1 - 1
tests/end-to-end/test_borgmatic.py

@@ -19,7 +19,7 @@ def generate_configuration(config_path, repository_path):
         .replace('ssh://user@backupserver/./sourcehostname.borg', repository_path)
         .replace('ssh://user@backupserver/./sourcehostname.borg', repository_path)
         .replace('- path: /mnt/backup', '')
         .replace('- path: /mnt/backup', '')
         .replace('label: local', '')
         .replace('label: local', '')
-        .replace('- /home', '- {}'.format(config_path))
+        .replace('- /home', f'- {config_path}')
         .replace('- /etc', '')
         .replace('- /etc', '')
         .replace('- /var/log/syslog*', '')
         .replace('- /var/log/syslog*', '')
         + 'storage:\n    encryption_passphrase: "test"'
         + 'storage:\n    encryption_passphrase: "test"'