From c462f0c84c8981494ffd0b1a7cb49c552acc7847 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sun, 23 Feb 2025 09:59:19 -0800 Subject: [PATCH] Fix Python < 3.12 compatibility issue (#1005). --- borgmatic/hooks/credential/keepassxc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/borgmatic/hooks/credential/keepassxc.py b/borgmatic/hooks/credential/keepassxc.py index b280cc6a..e37be499 100644 --- a/borgmatic/hooks/credential/keepassxc.py +++ b/borgmatic/hooks/credential/keepassxc.py @@ -18,8 +18,10 @@ def load_credential(hook_config, config, credential_parameters): try: (database_path, attribute_name) = credential_parameters except ValueError: + path_and_name = ' '.join(credential_parameters) + raise ValueError( - f'Cannot load credential with invalid KeePassXC database path and attribute name: "{' '.join(credential_parameters)}"' + f'Cannot load credential with invalid KeePassXC database path and attribute name: "{path_and_name}"' ) if not os.path.exists(database_path):