mirror of https://github.com/pypa/pip
Reword warning for invalid content-type
This commit is contained in:
parent
fa67244d45
commit
64c78b19b9
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue