fallback to default value if env variable not set

This commit is contained in:
rra 2024-04-16 11:56:55 +02:00
parent c3120bc3e6
commit a4f0899e68

View file

@ -50,6 +50,6 @@ class Config(object):
CLOUDFLARE_API_TOKEN = os.environ.get('CLOUDFLARE_API_TOKEN') or '' CLOUDFLARE_API_TOKEN = os.environ.get('CLOUDFLARE_API_TOKEN') or ''
CLOUDFLARE_ZONE_ID = os.environ.get('CLOUDFLARE_ZONE_ID') or '' CLOUDFLARE_ZONE_ID = os.environ.get('CLOUDFLARE_ZONE_ID') or ''
SPICY_UNDER_10 = float(os.environ.get('SPICY_UNDER_10')) or 1.0 SPICY_UNDER_10 = float(os.environ.get('SPICY_UNDER_10', 1.0))
SPICY_UNDER_30 = float(os.environ.get('SPICY_UNDER_30')) or 1.0 SPICY_UNDER_30 = float(os.environ.get('SPICY_UNDER_30', 1.0))
SPICY_UNDER_60 = float(os.environ.get('SPICY_UNDER_60')) or 1.0 SPICY_UNDER_60 = float(os.environ.get('SPICY_UNDER_60', 1.0))