From 45ab9addb331b6e5190998c4e3b4527a9b0c6ca3 Mon Sep 17 00:00:00 2001 From: Bryce Lowe Date: Thu, 23 Feb 2023 16:01:19 -0800 Subject: [PATCH] fix: remove encoding from password file reads The password files are opened in binary mode so an encoding argument isn't necessary and causes the script to crash. Fixes #2 --- vault2vault.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vault2vault.py b/vault2vault.py index 243526e..44cc090 100644 --- a/vault2vault.py +++ b/vault2vault.py @@ -369,7 +369,7 @@ def _load_password( if fpath: try: - with Path(fpath).resolve().open("rb", encoding="utf-8") as infile: + with Path(fpath).resolve().open("rb") as infile: return VaultSecret(infile.read()) except (FileNotFoundError, PermissionError) as err: raise RuntimeError(