diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2021-04-19 21:54:00 +0100 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2021-04-19 21:54:00 +0100 |
commit | 171daf88a753d5683dda695ff83013ae90a76809 (patch) | |
tree | 00fb9c7aafe4cd708b4ad27937663ac4c12620df /subreddit.py | |
parent | 6f29d39a9727688f7f4b25670614abbe66baa957 (diff) | |
download | SmallYTChannelBot-171daf88a753d5683dda695ff83013ae90a76809.tar.gz SmallYTChannelBot-171daf88a753d5683dda695ff83013ae90a76809.zip |
fixed some bugs
Diffstat (limited to 'subreddit.py')
-rwxr-xr-x | subreddit.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/subreddit.py b/subreddit.py index e8c37bb..f4eb8fe 100755 --- a/subreddit.py +++ b/subreddit.py @@ -11,7 +11,12 @@ import json import re import os -with open("config.json", "r") as f: +if os.path.split(os.getcwd())[-1] == "onceaday": + configpath = "../config.json" +else: + configpath = "config.json" + +with open(configpath, "r") as f: CONFIG = json.load(f) REDDIT = praw.Reddit(**CONFIG["redditapi"]) |