Update env management
All checks were successful
Build and Deploy / build (push) Successful in 2m57s
All checks were successful
Build and Deploy / build (push) Successful in 2m57s
This commit is contained in:
@@ -8,7 +8,7 @@ load_dotenv() # Loads variables from .env into environment
|
||||
|
||||
def get_env_var(name: str) -> str:
|
||||
value = os.getenv(name)
|
||||
if value is None:
|
||||
if value is None or value == "":
|
||||
raise EnvironmentError(f"Missing required environment variable: {name}")
|
||||
return value
|
||||
|
||||
@@ -18,3 +18,4 @@ AUTHORIZED_USER_ID = int(get_env_var("AUTHORIZED_USER_ID"))
|
||||
NTFY_AUTH_HEADER = get_env_var("NTFY_AUTH_HEADER")
|
||||
KUMA_API_PASSWORD = get_env_var("KUMA_API_PASSWORD")
|
||||
TORRENT_API_PASSWORD = get_env_var("TORRENT_API_PASSWORD")
|
||||
PORTAINER_API_KEY = get_env_var("PORTAINER_API_KEY")
|
||||
|
||||
Reference in New Issue
Block a user