Skip to content

Commit

Permalink
Do not retry SSLError requests
Browse files Browse the repository at this point in the history
  • Loading branch information
yatmanov committed Dec 11, 2024
1 parent 3662007 commit bb48f73
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions polyanalyst6api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ def __init__(
)
self._s.mount('http://', adapter)
self._s.mount('https://', adapter)
# do not retry SSLError. without this login takes ~30 seconds to throw an error
self._s.mount('https://', HTTPAdapter(max_retries=urllib3.util.Retry(0, status_forcelist=[495])))
self._s.verify = kwargs.get('verify', True)
self._s.headers.update({'User-Agent': self.user_agent})

Expand Down

0 comments on commit bb48f73

Please sign in to comment.