backport r57626
diff --git a/Lib/robotparser.py b/Lib/robotparser.py
index 48ea066..cf0a58d 100644
--- a/Lib/robotparser.py
+++ b/Lib/robotparser.py
@@ -233,6 +233,11 @@
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,