1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Reword warning for invalid content-type

This commit is contained in:
Devesh Kumar Singh 2020-04-24 19:22:29 +05:30
parent fa67244d45
commit 64c78b19b9
2 changed files with 2 additions and 2 deletions

View file

@ -457,7 +457,7 @@ def _get_html_page(link, session=None):
except _NotHTML as exc: except _NotHTML as exc:
logger.warning( logger.warning(
'Skipping page %s because the %s request got Content-Type: %s.' '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, link, exc.request_desc, exc.content_type,
) )
except HTTPError as exc: except HTTPError as exc:

View file

@ -501,7 +501,7 @@ def test_get_html_page_invalid_content_type(caplog, content_type):
assert ('pip._internal.index.collector', assert ('pip._internal.index.collector',
logging.WARNING, logging.WARNING,
'Skipping page {} because the GET request got Content-Type: {}.' '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)) \ url, content_type)) \
in caplog.record_tuples in caplog.record_tuples