From 4fb89aacaeccfb23246064910478fbc53291ee25 Mon Sep 17 00:00:00 2001 From: TomixUG Date: Fri, 1 Jul 2022 19:21:14 +0200 Subject: [PATCH] fix TIMES_TO_RUN and initial .env setup --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index be27079..0aca634 100755 --- a/main.py +++ b/main.py @@ -32,9 +32,6 @@ print_markdown( def main(): - if check_env() is not True: - exit() - load_dotenv() cleanup() reddit_object = get_subreddit_threads() @@ -55,6 +52,9 @@ def run_many(times): if __name__ == "__main__": + if check_env() is not True: + exit() + load_dotenv() try: if getenv("TIMES_TO_RUN") and isinstance(int(getenv("TIMES_TO_RUN")), int): run_many(int(getenv("TIMES_TO_RUN")))