meow (#1285)
This commit is contained in:
@@ -21,11 +21,12 @@ import sys
|
||||
from pathlib import Path
|
||||
|
||||
_HERE = Path(__file__).resolve().parent
|
||||
_TSSBOT_DIR = _HERE.parent # scripts/ lives under TSSBOT/, .env is one level up
|
||||
|
||||
# Try loading .env if python-dotenv is available
|
||||
try:
|
||||
from dotenv import load_dotenv
|
||||
load_dotenv(dotenv_path=_HERE / ".env")
|
||||
load_dotenv(dotenv_path=_TSSBOT_DIR / ".env")
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user