From 695aba6ace1fd44e53ff8f16556aae568e7555dc Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 19 Dec 2022 14:37:49 +0100 Subject: [PATCH] Fix --- reddit/subreddit.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/reddit/subreddit.py b/reddit/subreddit.py index 1dfa882..0c2d09a 100644 --- a/reddit/subreddit.py +++ b/reddit/subreddit.py @@ -84,21 +84,19 @@ def get_subreddit_threads(POST_ID: str): return get_subreddit_threads(POST_ID) # submission already done. rerun if settings.config["settings"]["storymode"]: - if not submission.selftext and settings.config["reddit"]["thread"]["post_id"] != "": + if not submission.selftext: print_substep("You are trying to use story mode on post with no post text") exit() - elif not submission.selftext: - print_substep("You are trying to use story mode on post with no post text") # not allow postid post with no self text it story == true - return get_subreddit_threads(POST_ID) else: # Check for the length of the post text if len(submission.selftext) > (settings.config["settings"]["storymode_max_length"] or 2000): print_substep( - f"Post is too long ({len(submission.selftext)}), retrying with a different post. ({settings.config['settings']['storymode_max_length']} character limit)" + f"Post is too long ({len(submission.selftext)}), try with a different post. ({settings.config['settings']['storymode_max_length']} character limit)" ) - return get_subreddit_threads(POST_ID) + exit() elif not submission.num_comments: - return get_subreddit_threads(POST_ID) + print_substep("No comments found. Skipping.") + exit() submission = check_done(submission) # double-checking