mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-04 12:54:42 +00:00
Properly detect a callable object in robots.txt callback
This commit is contained in:
parent
6024f2e43e
commit
0afd5f7cc6
1 changed files with 1 additions and 1 deletions
2
linkcheck/cache/robots_txt.py
vendored
2
linkcheck/cache/robots_txt.py
vendored
|
|
@ -45,7 +45,7 @@ class RobotsTxt (object):
|
|||
password=password)
|
||||
rp.set_url(roboturl)
|
||||
rp.read()
|
||||
if callback is not None:
|
||||
if hasattr(callback, '__call__'):
|
||||
parts = urlutil.url_split(rp.url)
|
||||
host = "%s:%d" % (parts[1], parts[2])
|
||||
useragent = configuration.UserAgent
|
||||
|
|
|
|||
Loading…
Reference in a new issue