mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Fix exception catch order
SSLError inherits from ConnectionError
This commit is contained in:
parent
a178a5fc90
commit
b018c9ab4d
|
@ -796,14 +796,14 @@ class HTMLPage(object):
|
|||
except requests.HTTPError as exc:
|
||||
level = 2 if exc.response.status_code == 404 else 1
|
||||
cls._handle_fail(link, exc, url, level=level)
|
||||
except requests.ConnectionError as exc:
|
||||
cls._handle_fail(link, "connection error: %s" % exc, url)
|
||||
except requests.Timeout:
|
||||
cls._handle_fail(link, "timed out", url)
|
||||
except SSLError as exc:
|
||||
reason = ("There was a problem confirming the ssl certificate: "
|
||||
"%s" % exc)
|
||||
cls._handle_fail(link, reason, url, level=2, meth=logger.info)
|
||||
except requests.ConnectionError as exc:
|
||||
cls._handle_fail(link, "connection error: %s" % exc, url)
|
||||
except requests.Timeout:
|
||||
cls._handle_fail(link, "timed out", url)
|
||||
else:
|
||||
return inst
|
||||
|
||||
|
|
Loading…
Reference in a new issue