mirror of
https://github.com/enpaul/vault2vault.git
synced 2024-11-22 01:56:48 +00:00
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
This commit is contained in:
parent
90e4a32753
commit
45ab9addb3
@ -369,7 +369,7 @@ def _load_password(
|
|||||||
|
|
||||||
if fpath:
|
if fpath:
|
||||||
try:
|
try:
|
||||||
with Path(fpath).resolve().open("rb", encoding="utf-8") as infile:
|
with Path(fpath).resolve().open("rb") as infile:
|
||||||
return VaultSecret(infile.read())
|
return VaultSecret(infile.read())
|
||||||
except (FileNotFoundError, PermissionError) as err:
|
except (FileNotFoundError, PermissionError) as err:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
|
Loading…
Reference in New Issue
Block a user