1
0

Fix style
Some checks failed
Test Python / Test (push) Has been cancelled

This commit is contained in:
Jon Michael Aanes 2024-06-12 23:38:46 +02:00
parent 1b5f49aab0
commit 0cf001ead9
Signed by: Jmaa
SSH Key Fingerprint: SHA256:Ab0GfHGCblESJx7JRE4fj4bFy/KRpeLhi41y4pF3sNA

View File

@ -17,7 +17,9 @@ ENV_KEY_VAULT_MOUNT_POINT = 'VAULT_MOUNT_POINT'
class SecretLoader:
"""Priority order:
"""System for loading secrets from a variety of sources.
Priority order:
0. Hardcoded values. This is purely for prototyping.
1. Files pointed to by environment variables.
@ -70,8 +72,7 @@ class SecretLoader:
filepath = f'./secrets/{env_key.lower()}'
try:
with open(filepath) as f:
value = f.read().strip()
return value
return f.read().strip()
except Exception:
return None