Skip to content

Commit

Permalink
Use requests retry adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkubi committed May 23, 2023
1 parent a07bd8d commit 44f3688
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pydactyl/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
def http_adapter(backoff_factor, retries, extra_retry_codes):
"""Configures an HTTP adapter with retries and backoff."""
retry_codes = [429] + extra_retry_codes
retries = requests.packages.urllib3.util.retry.Retry(
retries = requests.adapters.Retry(
total=retries, status_forcelist=retry_codes,
backoff_factor=backoff_factor,
allowed_methods=['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'])
Expand Down

0 comments on commit 44f3688

Please sign in to comment.