]> granicus.if.org Git - python/commitdiff
Avoid the fancy handler for error 401 (request authentication).
authorGuido van Rossum <guido@python.org>
Wed, 7 May 1997 15:00:56 +0000 (15:00 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 7 May 1997 15:00:56 +0000 (15:00 +0000)
Tools/webchecker/webchecker.py

index 8b27dd88536ad1384f99d3d173c6d9948b0d4cfe..dba641c848fa9bd0ce7613ee175ce387935b5695 100755 (executable)
@@ -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))