diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2025-06-17 15:36:23 +0100 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2025-06-17 15:36:23 +0100 |
commit | b0565ec294c88b6b3ede8c5f7def488eb6e5f75a (patch) | |
tree | fd0fbfc92a5885a95ade0efe40f6b5fd8608527c /subreddit.py | |
parent | 4bcba9bfeff003e081833b4d6290290271aae967 (diff) | |
download | SmallYTChannelBot-b0565ec294c88b6b3ede8c5f7def488eb6e5f75a.tar.gz SmallYTChannelBot-b0565ec294c88b6b3ede8c5f7def488eb6e5f75a.zip |
Fixed some Dockerfile bugs
Diffstat (limited to 'subreddit.py')
-rwxr-xr-x | subreddit.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/subreddit.py b/subreddit.py index 8e00915..219f59a 100755 --- a/subreddit.py +++ b/subreddit.py @@ -16,10 +16,10 @@ import json import re 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) |