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:
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:

View File

@ -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