Console outputs subreddit

Console will output the specified subreddit that you chose in .env if any
pull/4/head
Owen Gaspard 3 years ago
parent 22b31bc71a
commit 4f4616a49f

@ -31,6 +31,7 @@ def get_subreddit_threads():
else:
try:
subreddit = reddit.subreddit(os.getenv("SUBREDDIT"))
print_substep(f"Using subreddit {os.getenv('SUBREDDIT')}")
except ValueError:
subreddit = reddit.subreddit("askreddit")
print_substep("Subreddit not defined. Using AskReddit.")

Loading…
Cancel
Save