aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2021-05-11 20:57:41 +0300
committerGravatar Hassan Abouelela <[email protected]>2021-05-11 21:10:32 +0300
commit87ddedc2c6d17596598c2e001de30d2cc64fb310 (patch)
treef99232de9553593f080fefc2d036c7cf1b109ff8
parentSwitches To Poetry And Python 3.9 (diff)
Adds Python-Dotenv
Adds python dotenv to emulate the default .env file loading behavior from pipenv. Signed-off-by: Hassan Abouelela <[email protected]>
-rw-r--r--bot/constants.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bot/constants.py b/bot/constants.py
index e1c3ade5a..43105a906 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -19,6 +19,12 @@ from typing import Dict, List, Optional
import yaml
+try:
+ import dotenv
+ dotenv.load_dotenv()
+except ModuleNotFoundError:
+ pass
+
log = logging.getLogger(__name__)