summaryrefslogtreecommitdiffstats
path: root/Tools/webchecker
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-05-07 15:00:56 (GMT)
committerGuido van Rossum <guido@python.org>1997-05-07 15:00:56 (GMT)
commit89efda363faf29f3fb3993efe30d62872493ad02 (patch)
tree10b446527cab6824fc726cf1f5f10a47d4cc4657 /Tools/webchecker
parent78089e20b682242ace18fe1a4ac5d63126dcd194 (diff)
downloadcpython-89efda363faf29f3fb3993efe30d62872493ad02.zip
cpython-89efda363faf29f3fb3993efe30d62872493ad02.tar.gz
cpython-89efda363faf29f3fb3993efe30d62872493ad02.tar.bz2
Avoid the fancy handler for error 401 (request authentication).
Diffstat (limited to 'Tools/webchecker')
-rwxr-xr-xTools/webchecker/webchecker.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/Tools/webchecker/webchecker.py b/Tools/webchecker/webchecker.py
index 8b27dd8..dba641c 100755
--- a/Tools/webchecker/webchecker.py
+++ b/Tools/webchecker/webchecker.py
@@ -93,10 +93,8 @@ rooturl -- URL to start checking
"""
-# ' Emacs bait
-
-__version__ = "0.4"
+__version__ = "0.5"
import sys
@@ -487,7 +485,12 @@ class MyURLopener(urllib.FancyURLopener):
def __init__(*args):
self = args[0]
apply(urllib.FancyURLopener.__init__, args)
- self.addheaders = [('User-agent', 'Python-webchecker/%s' % __version__)]
+ self.addheaders = [
+ ('User-agent', 'Python-webchecker/%s' % __version__),
+ ]
+
+ def http_error_401(self, url, fp, errcode, errmsg, headers):
+ return None
def open_file(self, url):
path = urllib.url2pathname(urllib.unquote(url))