Also handle permission error
This commit is contained in:
parent
3d50688b61
commit
2aa982d407
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue
Block a user