Skip to content

Commit 20e4227

Browse files
authored
Merge pull request #6367 from cboylan/vendored-exceptions
Consistently catch exceptions in index.py
2 parents 68bc0e0 + 63ccc28 commit 20e4227

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

news/85016e72-3c01-455a-ad4e-e25f676c7381.trivial

Whitespace-only changes.

src/pip/_internal/index.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from pip._vendor.packaging import specifiers
1717
from pip._vendor.packaging.utils import canonicalize_name
1818
from pip._vendor.packaging.version import parse as parse_version
19-
from pip._vendor.requests.exceptions import RetryError, SSLError
19+
from pip._vendor.requests.exceptions import HTTPError, RetryError, SSLError
2020
from pip._vendor.six.moves.urllib import parse as urllib_parse
2121
from pip._vendor.six.moves.urllib import request as urllib_request
2222

@@ -237,7 +237,7 @@ def _get_html_page(link, session=None):
237237
'Skipping page %s because the %s request got Content-Type: %s',
238238
link, exc.request_desc, exc.content_type,
239239
)
240-
except requests.HTTPError as exc:
240+
except HTTPError as exc:
241241
_handle_get_page_fail(link, exc)
242242
except RetryError as exc:
243243
_handle_get_page_fail(link, exc)

0 commit comments

Comments
 (0)