From cead064e73d27ef6e9666dfbbfbda8054d0f1c4c Mon Sep 17 00:00:00 2001 From: Frisk Date: Fri, 15 Jul 2022 02:32:45 +0200 Subject: [PATCH] Partially revert previous bugfix --- setup.py | 2 +- src/configloader.py | 2 +- src/discussions.py | 7 ++----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index 76377ce..6a8c59e 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup( name='RcGcDw', - version='1.14.0.1', + version='1.15.0.2', url='https://gitlab.com/piotrex43/RcGcDw/', license='GNU GPLv3', author='Frisk', diff --git a/src/configloader.py b/src/configloader.py index 545db53..c22eea2 100644 --- a/src/configloader.py +++ b/src/configloader.py @@ -28,7 +28,7 @@ def load_settings(): if settings["limitrefetch"] < settings["limit"] and settings["limitrefetch"] != -1: settings["limitrefetch"] = settings["limit"] if "user-agent" in settings["header"]: - settings["header"]["user-agent"] = settings["header"]["user-agent"].format(version="1.14.1") # set the version in the useragent + settings["header"]["user-agent"] = settings["header"]["user-agent"].format(version="1.15.0.1") # set the version in the useragent except FileNotFoundError: logging.critical("No config file could be found. Please make sure settings.json is in the directory.") sys.exit(1) diff --git a/src/discussions.py b/src/discussions.py index ccf8a8e..7ef9cfd 100644 --- a/src/discussions.py +++ b/src/discussions.py @@ -56,6 +56,7 @@ def inject_client(client_obj): """Function to avoid circular import issues""" global client client = client_obj + client.schedule(fetch_discussions, every=settings["fandom_discussions"]["cooldown"]) def fetch_discussions(): @@ -155,8 +156,4 @@ def safe_request(url) -> Optional[requests.Response]: else: if 499 < request.status_code < 600: return None - return request - - -client.schedule(fetch_discussions, every=settings["fandom_discussions"]["cooldown"]) - + return request \ No newline at end of file