Skip to content
Myr

Correctly raise SSLError from urllib3.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Cory Benfield · committed by Cory Benfield · parent 8b3f20c · Browse files · 1 file+5 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−0 removed

  • other:+5 added−0 removed

1 file+5 added−0 removed

modified:requests/adapters.py+5 added
499 unmodified lines
500501 if isinstance(e.reason, _ProxyError):502 raise ProxyError(e, request=request)503504 if isinstance(e.reason, _SSLError):505 # This branch is for urllib3 v1.22 and later.506 raise SSLError(e, request=request)507508 raise ConnectionError(e, request=request)509510 except ClosedPoolError as e:511 raise ConnectionError(e, request=request)
2 unmodified lines
514 raise ProxyError(e)515516 except (_SSLError, _HTTPError) as e:517 if isinstance(e, _SSLError):518 # This branch is for urllib3 versions earlier than v1.22519 raise SSLError(e, request=request)520 elif isinstance(e, ReadTimeoutError):521 raise ReadTimeout(e, request=request)522 else:
3 unmodified lines