mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-22 00:14:10 +00:00
Partially revert previous bugfix
This commit is contained in:
parent
3f7f5714d4
commit
cead064e73
2
setup.py
2
setup.py
|
@ -2,7 +2,7 @@ from setuptools import setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='RcGcDw',
|
name='RcGcDw',
|
||||||
version='1.14.0.1',
|
version='1.15.0.2',
|
||||||
url='https://gitlab.com/piotrex43/RcGcDw/',
|
url='https://gitlab.com/piotrex43/RcGcDw/',
|
||||||
license='GNU GPLv3',
|
license='GNU GPLv3',
|
||||||
author='Frisk',
|
author='Frisk',
|
||||||
|
|
|
@ -28,7 +28,7 @@ def load_settings():
|
||||||
if settings["limitrefetch"] < settings["limit"] and settings["limitrefetch"] != -1:
|
if settings["limitrefetch"] < settings["limit"] and settings["limitrefetch"] != -1:
|
||||||
settings["limitrefetch"] = settings["limit"]
|
settings["limitrefetch"] = settings["limit"]
|
||||||
if "user-agent" in settings["header"]:
|
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:
|
except FileNotFoundError:
|
||||||
logging.critical("No config file could be found. Please make sure settings.json is in the directory.")
|
logging.critical("No config file could be found. Please make sure settings.json is in the directory.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
|
@ -56,6 +56,7 @@ def inject_client(client_obj):
|
||||||
"""Function to avoid circular import issues"""
|
"""Function to avoid circular import issues"""
|
||||||
global client
|
global client
|
||||||
client = client_obj
|
client = client_obj
|
||||||
|
client.schedule(fetch_discussions, every=settings["fandom_discussions"]["cooldown"])
|
||||||
|
|
||||||
|
|
||||||
def fetch_discussions():
|
def fetch_discussions():
|
||||||
|
@ -155,8 +156,4 @@ def safe_request(url) -> Optional[requests.Response]:
|
||||||
else:
|
else:
|
||||||
if 499 < request.status_code < 600:
|
if 499 < request.status_code < 600:
|
||||||
return None
|
return None
|
||||||
return request
|
return request
|
||||||
|
|
||||||
|
|
||||||
client.schedule(fetch_discussions, every=settings["fandom_discussions"]["cooldown"])
|
|
||||||
|
|
Loading…
Reference in a new issue