diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2025-06-17 15:47:39 +0100 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2025-06-17 15:47:39 +0100 |
commit | 035bbdf5f1796c78e4d71c378c19ed4e95d2a076 (patch) | |
tree | e820fcc9f37250e3c4fc9281052fbca5c6a85c84 /ytapi.py | |
parent | b0565ec294c88b6b3ede8c5f7def488eb6e5f75a (diff) | |
download | SmallYTChannelBot-035bbdf5f1796c78e4d71c378c19ed4e95d2a076.tar.gz SmallYTChannelBot-035bbdf5f1796c78e4d71c378c19ed4e95d2a076.zip |
Diffstat (limited to 'ytapi.py')
-rwxr-xr-x | ytapi.py | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -4,10 +4,9 @@ import json import js2py import os -if os.path.split(os.getcwd())[-1] == "onceaday": - configpath = "../config.json" -else: - configpath = "config.json" +configpath = os.path.join(os.path.dirname(__file__), "config.json") +if not os.path.exists(configpath): + configpath = os.path.join(os.path.dirname(__file__), "..", "config.json") with open(configpath, "r") as f: CONFIG = json.load(f) |