From c0642a12fa64b0be7671f08f00362d96360495e4 Mon Sep 17 00:00:00 2001 From: kwzrd Date: Sun, 22 Mar 2020 18:37:29 +0100 Subject: Deseasonify: load bool env var properly Fixes a bug where the `autostart` boolean constant wasn't being loaded properly and would always be set to True, as `bool("False") is True`. The constant now defaults to False. --- bot/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bot/constants.py') diff --git a/bot/constants.py b/bot/constants.py index d2039c81..c2c76122 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -65,7 +65,7 @@ class Channels(NamedTuple): class Branding: cycle_frequency = int(environ.get("CYCLE_FREQUENCY", 3)) # 0: never, 1: every day, 2: every other day, ... - autostart = bool(environ.get("BRANDING_AUTOSTART", True)) # Launch the branding daemon automatically on start-up + autostart = environ.get("BRANDING_AUTOSTART", "").lower() == "true" # Launch the branding daemon on start-up class Client(NamedTuple): -- cgit v1.2.3