1
0

Also handle permission error
Some checks failed
Run Python tests (through Pytest) / Test (push) Waiting to run
Verify Python project can be installed, loaded and have version checked / Test (push) Waiting to run
Python Ruff Code Quality / ruff (push) Has been cancelled

This commit is contained in:
Jon Michael Aanes 2024-11-26 23:01:08 +01:00
parent 3d50688b61
commit 2aa982d407
Signed by: Jmaa
SSH Key Fingerprint: SHA256:Ab0GfHGCblESJx7JRE4fj4bFy/KRpeLhi41y4pF3sNA

View File

@ -184,7 +184,7 @@ class SecretLoader:
try:
with open(filepath) as f:
return f.read().strip()
except FileNotFoundError:
except (FileNotFoundError, PermissionError):
return None
def _load_or_none_env(self, secret_name) -> str | None:
@ -210,7 +210,7 @@ class SecretLoader:
check=False,
shell=False,
)
except FileNotFoundError:
except (FileNotFoundError, PermissionError):
return None
return self._convert_pass_process_result_to_password(