Skip to content

Commit

Permalink
Fix unit tests crashing because of unset but parsed env var
Browse files Browse the repository at this point in the history
  • Loading branch information
ctmbl committed Oct 18, 2023
1 parent d1613c3 commit 924bcd6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/bot/root_pythia_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@
from bot.dummy_db_manager import DummyDBManager


CHANNEL_ID = int(getenv("CHANNEL_ID"))
CHANNEL_ID = getenv("CHANNEL_ID")
if CHANNEL_ID.isnumeric():
CHANNEL_ID = int(CHANNEL_ID)
else:
logging.warning(
"CHANNEL_ID environment variable is either not set or not an integer: %s", CHANNEL_ID
)


def craft_intents():
Expand Down

0 comments on commit 924bcd6

Please sign in to comment.