mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-10 15:44:45 +00:00
nicer host not found error msg
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1213 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
4cf6b6caf3
commit
7216e582fe
1 changed files with 6 additions and 3 deletions
|
|
@ -357,9 +357,12 @@ class UrlData (object):
|
|||
if self.config["anchors"]:
|
||||
self.checkAnchors()
|
||||
except tuple(ExcList):
|
||||
value, tb = sys.exc_info()[1:]
|
||||
debug(HURT_ME_PLENTY, "exception", traceback.format_tb(tb))
|
||||
self.setError(str(value))
|
||||
etype, evalue, etb = sys.exc_info()
|
||||
debug(HURT_ME_PLENTY, "exception", traceback.format_tb(etb))
|
||||
# make nicer error msg for unknown hosts
|
||||
if isinstance(evalue, socket.error) and evalue[0]==-2:
|
||||
evalue = i18n._('Host not found')
|
||||
self.setError(str(evalue))
|
||||
|
||||
# check content
|
||||
warningregex = self.config["warningregex"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue