Initialize variables in reset(), not in subsequent methods

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3796 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2008-06-08 09:27:13 +00:00
parent 497d3d41eb
commit a880939c40

View file

@ -120,6 +120,10 @@ class HttpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport):
self.persistent = False
# URLs seen through 301/302 redirections
self.aliases = []
# initialize check data
self.headers = None
self.auth = None
self.cookies = []
def allows_robots (self, url):
"""
@ -156,10 +160,6 @@ class HttpUrl (internpaturl.InternPatternUrl, proxysupport.ProxySupport):
"""
# set the proxy, so a 407 status after this is an error
self.set_proxy(self.aggregate.config["proxy"].get(self.scheme))
# initialize check data
self.headers = None
self.auth = None
self.cookies = []
# check robots.txt
if not self.allows_robots(self.url):
# remove all previously stored results