Explorar o código

Fix Python < 3.12 compatibility issue (#1005).

Dan Helfman hai 3 meses
pai
achega
c462f0c84c
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      borgmatic/hooks/credential/keepassxc.py

+ 3 - 1
borgmatic/hooks/credential/keepassxc.py

@@ -18,8 +18,10 @@ def load_credential(hook_config, config, credential_parameters):
     try:
     try:
         (database_path, attribute_name) = credential_parameters
         (database_path, attribute_name) = credential_parameters
     except ValueError:
     except ValueError:
+        path_and_name = ' '.join(credential_parameters)
+
         raise ValueError(
         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):
     if not os.path.exists(database_path):