Skip to content

Commit

Permalink
Reword warning for invalid content-type
Browse files Browse the repository at this point in the history
  • Loading branch information
deveshks committed Apr 24, 2020
1 parent 103a4d6 commit 91c01e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pip/_internal/index/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def _get_html_page(link, session=None):
except _NotHTML as exc:
logger.warning(
'Skipping page %s because the %s request got Content-Type: %s.'
'The supported Content-Type is text/html',
'The only supported Content-Type is text/html',
link, exc.request_desc, exc.content_type,
)
except HTTPError as exc:
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def test_get_html_page_invalid_content_type(caplog, content_type):
assert ('pip._internal.index.collector',
logging.WARNING,
'Skipping page {} because the GET request got Content-Type: {}.'
'The supported Content-Type is text/html'.format(
'The only supported Content-Type is text/html'.format(
url, content_type)) \
in caplog.record_tuples

Expand Down

0 comments on commit 91c01e3

Please sign in to comment.