fixes 813986

This commit is contained in:
Skip Montanaro 2007-08-28 23:22:52 +00:00
parent bf138333ce
commit 1a41313684
2 changed files with 16 additions and 0 deletions

View file

@ -230,6 +230,11 @@ class URLopener(urllib.FancyURLopener):
urllib.FancyURLopener.__init__(self, *args)
self.errcode = 200
def prompt_user_passwd(self, host, realm):
## If robots.txt file is accessible only with a password,
## we act as if the file wasn't there.
return None, None
def http_error_default(self, url, fp, errcode, errmsg, headers):
self.errcode = errcode
return urllib.FancyURLopener.http_error_default(self, url, fp, errcode,