Compare commits

..
3 Commits
6 changed files with 17 additions and 7 deletions
+4
View File
@@ -1,3 +1,7 @@
1.9.12
* #1005: Fix the credential hooks to avoid using Python 3.12+ string features. Now borgmatic will
work with Python 3.9, 3.10, and 3.11 again.
1.9.11
* #795: Add credential loading from file, KeePassXC, and Docker/Podman secrets. See the
documentation for more information:
+3 -1
View File
@@ -21,7 +21,9 @@ def load_credential(hook_config, config, credential_parameters):
try:
(secret_name,) = credential_parameters
except ValueError:
raise ValueError(f'Cannot load invalid secret name: "{' '.join(credential_parameters)}"')
name = ' '.join(credential_parameters)
raise ValueError(f'Cannot load invalid secret name: "{name}"')
if not SECRET_NAME_PATTERN.match(secret_name):
raise ValueError(f'Cannot load invalid secret name: "{secret_name}"')
+3 -1
View File
@@ -15,7 +15,9 @@ def load_credential(hook_config, config, credential_parameters):
try:
(credential_path,) = credential_parameters
except ValueError:
raise ValueError(f'Cannot load invalid credential: "{' '.join(credential_parameters)}"')
name = ' '.join(credential_parameters)
raise ValueError(f'Cannot load invalid credential: "{name}"')
try:
with open(
+3 -1
View File
@@ -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):
+3 -3
View File
@@ -20,9 +20,9 @@ def load_credential(hook_config, config, credential_parameters):
try:
(credential_name,) = credential_parameters
except ValueError:
raise ValueError(
f'Cannot load invalid credential name: "{' '.join(credential_parameters)}"'
)
name = ' '.join(credential_parameters)
raise ValueError(f'Cannot load invalid credential name: "{name}"')
credentials_directory = os.environ.get('CREDENTIALS_DIRECTORY')
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "borgmatic"
version = "1.9.11"
version = "1.9.12"
authors = [
{ name="Dan Helfman", email="witten@torsion.org" },
]