Warn if package index gets unexpected Content-Type

This commit is contained in:
Devesh Kumar Singh 2020-04-19 15:03:53 +05:30
parent 80c640b5a8
commit 1bc7f535ca
2 changed files with 4 additions and 2 deletions

1
news/6754.feature Normal file
View File

@ -0,0 +1 @@
Warn if index pages have unexpected content-type

View File

@ -455,8 +455,9 @@ def _get_html_page(link, session=None):
'be checked by HEAD.', link,
)
except _NotHTML as exc:
logger.debug(
'Skipping page %s because the %s request got Content-Type: %s',
logger.warning(
'Skipping page %s because the %s request got Content-Type: %s.'
'The supported Content-Type is text/html',
link, exc.request_desc, exc.content_type,
)
except HTTPError as exc: