Skip to content

Commit 844647f

Browse files
committed
catch more errors during age encryption
1 parent 533107b commit 844647f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/batou/secrets/encryption.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ def load(id_path):
277277
key_content = f.read()
278278
try:
279279
priv_key = serialization.load_ssh_private_key(key_content, None)
280-
except ValueError:
280+
except (ValueError, TypeError):
281281
passphrase = get_passphrase(id_path).encode("utf-8")
282282
priv_key = serialization.load_ssh_private_key(
283283
key_content,

0 commit comments

Comments
 (0)