This commit is contained in:
Seaswimmer 2024-12-02 20:52:24 -05:00
parent cd820411c4
commit 5ddfbb3a7b
Signed by: cswimr
GPG key ID: 0EC431A8DA8F8087

View file

@ -37,7 +37,7 @@ def read_secret_file(secret: str, home: bool = False) -> str:
if home: if home:
path = os.path.expanduser(f"~/.secrets/{secret}") path = os.path.expanduser(f"~/.secrets/{secret}")
else: else:
path = f"/var/secrets/{secret}" path = f"/run/secrets/{secret}"
if not os.path.exists(path): if not os.path.exists(path):
raise FileNotFoundError(f"Secret file {path} does not exist or cannot be read.") raise FileNotFoundError(f"Secret file {path} does not exist or cannot be read.")
with open(file=path, mode="r") as secret_file: with open(file=path, mode="r") as secret_file: