This commit is contained in:
parent
1b5f49aab0
commit
0cf001ead9
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user