mirror of
https://github.com/FAUSheppy/icinga-webhook-gateway
synced 2026-04-26 14:12:29 +02:00
fix: required keys load from env
This commit is contained in:
@@ -467,7 +467,7 @@ def create_app():
|
|||||||
]
|
]
|
||||||
|
|
||||||
enforce_load_from_env = os.environ.get("ENFORCE_LOAD_FROM_ENV") or ""
|
enforce_load_from_env = os.environ.get("ENFORCE_LOAD_FROM_ENV") or ""
|
||||||
missing = [k for k in required_keys if k not in os.environ]
|
missing = [k for k in LOAD_FROM_ENV if k not in os.environ]
|
||||||
if missing and enforce_load_from_env.lower() == "true":
|
if missing and enforce_load_from_env.lower() == "true":
|
||||||
print(f"ENFORCE_LOAD_FROM_ENV is 'true' but we are missing: {missing} - Abort.")
|
print(f"ENFORCE_LOAD_FROM_ENV is 'true' but we are missing: {missing} - Abort.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user