diff options
author | 2021-05-11 20:57:41 +0300 | |
---|---|---|
committer | 2021-05-11 21:10:32 +0300 | |
commit | 87ddedc2c6d17596598c2e001de30d2cc64fb310 (patch) | |
tree | f99232de9553593f080fefc2d036c7cf1b109ff8 | |
parent | Switches 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.py | 6 |
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__) |