Merge pull request #449 from yzqzss/patch-2

make `requests.session` to use `--retries` value
pull/452/head
nemobis 1 year ago committed by GitHub
commit 0c4c54dc9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1776,7 +1776,7 @@ def getParameters(params=[]):
from requests.packages.urllib3.util.retry import Retry
from requests.adapters import HTTPAdapter
# Courtesy datashaman https://stackoverflow.com/a/35504626
__retries__ = Retry(total=5,
__retries__ = Retry(total=int(args.retries),
backoff_factor=2,
status_forcelist=[500, 502, 503, 504])
session.mount('https://', HTTPAdapter(max_retries=__retries__))

Loading…
Cancel
Save