mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-10 15:44:45 +00:00
forgot some cache adds
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1634 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
6dfb947183
commit
60dc606510
6 changed files with 12 additions and 0 deletions
|
|
@ -56,6 +56,7 @@ ExcList = [
|
|||
ftplib.error_perm,
|
||||
ftplib.error_proto,
|
||||
]
|
||||
# XXX remove this when depending on python >= 2.4
|
||||
if hasattr(socket, "sslerror"):
|
||||
ExcList.append(socket.sslerror)
|
||||
|
||||
|
|
|
|||
|
|
@ -29,3 +29,4 @@ class HttpsUrl (httpurl.HttpUrl):
|
|||
else:
|
||||
self.add_warning(_("%s url ignored")%self.scheme.capitalize())
|
||||
self.consumer.logger_new_url(self)
|
||||
self.consumer.cache.url_data_cache_add(self)
|
||||
|
|
|
|||
|
|
@ -246,6 +246,7 @@ class HttpUrl (urlbase.UrlBase, proxysupport.ProxySupport):
|
|||
_("recursive redirection encountered:\n %s") % \
|
||||
"\n => ".join(redirect_cache), valid=False)
|
||||
self.consumer.logger_new_url(self)
|
||||
self.consumer.cache.url_data_cache_add(self)
|
||||
return -1, response
|
||||
redirect_cache.append(redirected)
|
||||
# remember this alias
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ class IgnoredUrl (urlbase.UrlBase):
|
|||
def local_check (self):
|
||||
self.add_warning(_("%s url ignored")%self.scheme.capitalize())
|
||||
self.consumer.logger_new_url(self)
|
||||
self.consumer.cache.url_data_cache_add(self)
|
||||
|
||||
def can_get_content (self):
|
||||
return False
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ class TelnetUrl (urlbase.UrlBase):
|
|||
if not self.host:
|
||||
self.set_result(_("Host is empty"), valid=False)
|
||||
self.consumer.logger_new_url(self)
|
||||
self.consumer.cache.url_data_cache_add(self)
|
||||
return
|
||||
super(TelnetUrl, self).local_check()
|
||||
|
||||
|
|
|
|||
|
|
@ -217,6 +217,12 @@ class UrlBase (object):
|
|||
return urlparse.urlunsplit(self.urlparts[:4]+[''])
|
||||
return None
|
||||
|
||||
def is_cached_or_queued (self):
|
||||
"""look if this URL is already stored in the Cache or is pending
|
||||
in the URL queue"""
|
||||
return self.consumer.url_is_queued(self.get_cache_key()) or \
|
||||
self.is_cached()
|
||||
|
||||
def is_cached (self):
|
||||
"""look if this URL is already stored in the Cache"""
|
||||
return self.consumer.cache.url_is_cached(self.get_cache_key())
|
||||
|
|
@ -294,6 +300,7 @@ class UrlBase (object):
|
|||
self.add_info(
|
||||
_("outside of domain filter, checked only syntax"))
|
||||
self.consumer.logger_new_url(self)
|
||||
self.consumer.cache.url_data_cache_add(self)
|
||||
return
|
||||
|
||||
# check connection
|
||||
|
|
|
|||
Loading…
Reference in a new issue