Check if the required env vars aren't empty

This commit is contained in:
TSR Berry 2023-09-17 12:28:41 +02:00
parent 98c9cd3ee5
commit cf878fd360
No known key found for this signature in database
GPG key ID: 52353C0A4CCA15E2

View file

@ -21,7 +21,7 @@ SCRIPT_NAME = NAME.lower().replace("-", "_")
# Check environment variables
for key in ConfigKey:
if key not in os.environ.keys():
if key not in os.environ.keys() or len(os.environ[key]) == 0:
raise KeyError(f"Required environment variable not set: {key}")
APP_ID = int(os.environ[ConfigKey.AppID])