mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-01 03:24:43 +00:00
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:
parent
497d3d41eb
commit
a880939c40
1 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue