From 0a72c67c6c2704ea5e8dfa683facd1e8d423e138 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Wed, 22 Mar 2023 13:02:22 -0700 Subject: [PATCH] Add missing source directory error fix to NEWS (#655). --- NEWS | 1 + borgmatic/borg/rlist.py | 2 +- tests/unit/test_execute.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 0bb47e2..bd5687c 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ * #618: Add support for BORG_FILES_CACHE_TTL environment variable via "borg_files_cache_ttl" option in borgmatic's storage configuration. * #623: Fix confusing message when an error occurs running actions for a configuration file. + * #655: Fix error when databases are configured and a source directory doesn't exist. 1.7.9 * #295: Add a SQLite database dump/restore hook. diff --git a/borgmatic/borg/rlist.py b/borgmatic/borg/rlist.py index 2a465fb..33404f9 100644 --- a/borgmatic/borg/rlist.py +++ b/borgmatic/borg/rlist.py @@ -117,7 +117,7 @@ def list_repository( ) if rlist_arguments.json: - return execute_command_and_capture_output(main_command, extra_environment=borg_environment,) + return execute_command_and_capture_output(main_command, extra_environment=borg_environment) else: execute_command( main_command, diff --git a/tests/unit/test_execute.py b/tests/unit/test_execute.py index 3226a5a..badcb8f 100644 --- a/tests/unit/test_execute.py +++ b/tests/unit/test_execute.py @@ -239,7 +239,7 @@ def test_execute_command_and_capture_output_with_capture_stderr_returns_stderr() assert output == expected_output -def test_execute_command_and_capture_output_returns_output_when_error_code_is_one(): +def test_execute_command_and_capture_output_returns_output_when_process_error_is_not_considered_an_error(): full_command = ['foo', 'bar'] expected_output = '[]' err_output = b'[]'