From 7b9036fec0856340605c50e097fc416bdbefb604 Mon Sep 17 00:00:00 2001 From: MoojMidge <56883549+MoojMidge@users.noreply.github.com> Date: Fri, 24 May 2024 11:38:15 +1000 Subject: [PATCH] Update default value to None for wait parameter of RateLimitedAdapter --- kodi_addon_checker/addons/Repository.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kodi_addon_checker/addons/Repository.py b/kodi_addon_checker/addons/Repository.py index c6f6faf..ec19509 100644 --- a/kodi_addon_checker/addons/Repository.py +++ b/kodi_addon_checker/addons/Repository.py @@ -19,7 +19,7 @@ class RateLimitedAdapter(requests.adapters.HTTPAdapter): - def __init__(self, *args, retries=5, wait=10, **kwargs): + def __init__(self, *args, retries=5, wait=None, **kwargs): self._last_send = None self._wait_time = wait max_retries = requests.adapters.Retry( @@ -48,7 +48,7 @@ def send(self, *args, **kwargs): class Repository(): # Recover from unreliable mirrors _session = requests.Session() - _adapter = RateLimitedAdapter(retries=5, wait=None, pool_maxsize=3, pool_block=True) + _adapter = RateLimitedAdapter(retries=5, pool_maxsize=3, pool_block=True) _session.mount('http://', _adapter) _session.mount('https://', _adapter) atexit.register(_session.close)