diff --git a/src/pip/_internal/index/collector.py b/src/pip/_internal/index/collector.py index 321861e2c..7908ab996 100644 --- a/src/pip/_internal/index/collector.py +++ b/src/pip/_internal/index/collector.py @@ -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: diff --git a/tests/unit/test_collector.py b/tests/unit/test_collector.py index 9a7966688..0387813ad 100644 --- a/tests/unit/test_collector.py +++ b/tests/unit/test_collector.py @@ -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