Browse Source

Fix an unreleased regression in the KeePassXC hook in which it raised when it was used without explicit "keepassxc:" configuration (#1181).

Dan Helfman 1 week ago
parent
commit
928bb3fb8c
2 changed files with 2 additions and 2 deletions
  1. 1 1
      NEWS
  2. 1 1
      borgmatic/hooks/credential/keepassxc.py

+ 1 - 1
NEWS

@@ -10,7 +10,7 @@
  * Improve documentation search results for individual configuration options.
  * Add borgmatic release artifacts (wheel and tarball) to each release on the releases page:
    https://projects.torsion.org/borgmatic-collective/borgmatic/releases
- * Move the tarball of borgmatic's HTML documentation from the packages page to the releases pages.
+ * Move the tarball of borgmatic's HTML documentation from the packages page to the releases page.
 
 2.0.11
  * #957: Document borgmatic's limitations around parallelism—both its own and Borg's. See the

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

@@ -29,7 +29,7 @@ def load_credential(hook_config, config, credential_parameters):
     command = (
         tuple(shlex.split((hook_config or {}).get('keepassxc_cli_command', 'keepassxc-cli')))
         + ('show', '--show-protected', '--attributes', 'Password')
-        + (('--no-password',) if not hook_config.get('ask_for_password', True) else ())
+        + (('--no-password',) if not (hook_config or {}).get('ask_for_password', True) else ())
         + (
             ('--key-file', hook_config['key_file'])
             if hook_config and hook_config.get('key_file')