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 d5c94cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/bot/root_pythia_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
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 d5c94cd

Please sign in to comment.