Skip to content

Commit

Permalink
Warn if package index gets unexpected Content-Type
Browse files Browse the repository at this point in the history
  • Loading branch information
deveshks committed Apr 19, 2020
1 parent 97f6390 commit c66149b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions news/6754.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Warn if index pages have unexpected content-type
5 changes: 3 additions & 2 deletions src/pip/_internal/index/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,9 @@ def _get_html_page(link, session=None):
'be checked by HEAD.', link,
)
except _NotHTML as exc:
logger.debug(
'Skipping page %s because the %s request got Content-Type: %s',
logger.warning(
'Skipping page %s because the %s request got Content-Type: %s.'
'The supported Content-Type is text/html',
link, exc.request_desc, exc.content_type,
)
except HTTPError as exc:
Expand Down

0 comments on commit c66149b

Please sign in to comment.