Skip to content

Commit

Permalink
Update default value to None for wait parameter of RateLimitedAdapter
Browse files Browse the repository at this point in the history
  • Loading branch information
MoojMidge authored May 24, 2024
1 parent a9b0b1f commit 7b9036f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kodi_addon_checker/addons/Repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 7b9036f

Please sign in to comment.