mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-01 11:34:41 +00:00
Improve BadStatusline error message.
This commit is contained in:
parent
d15fafb1f7
commit
ad8525c483
1 changed files with 4 additions and 1 deletions
|
|
@ -554,7 +554,10 @@ class UrlBase (object):
|
|||
self.check_size()
|
||||
except tuple(ExcList):
|
||||
value = self.handle_exception()
|
||||
self.add_warning(_("could not get content: %(msg)r") %
|
||||
# make nicer error msg for bad status line
|
||||
if isinstance(value, httplib.BadStatusLine):
|
||||
value = _('Bad HTTP response %(line)r') % {"line": str(value)}
|
||||
self.add_warning(_("could not get content: %(msg)s") %
|
||||
{"msg": str(value)}, tag=WARN_URL_ERROR_GETTING_CONTENT)
|
||||
|
||||
def close_connection (self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue