more result sanity check warnings

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2749 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2005-07-14 13:35:18 +00:00
parent 3fb9de0847
commit 5d82d64c31

View file

@ -144,9 +144,15 @@ class UrlBase (object):
"""
if self.has_result:
linkcheck.log.warn(linkcheck.LOG_CHECK,
"Double result %r (previous %r)", msg, self.result)
"Double result %r (previous %r) for %s", msg, self.result, self)
else:
self.has_result = True
if not isinstance(msg, unicode):
linkcheck.log.warn(linkcheck.LOG_CHECK,
"Non-unicode result for %s: %r", self, msg)
elif not msg:
linkcheck.log.warn(linkcheck.LOG_CHECK,
"Empty result for %s", self)
self.result = msg
self.valid = valid