mirror of
https://github.com/python/cpython.git
synced 2025-07-28 13:44:43 +00:00
fixes 813986
This commit is contained in:
parent
bf138333ce
commit
1a41313684
2 changed files with 16 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue