]> granicus.if.org Git - python/commitdiff
Fix SF #565414, FancyURLopener() needs to support **kwargs
authorNeal Norwitz <nnorwitz@gmail.com>
Tue, 11 Jun 2002 13:38:51 +0000 (13:38 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Tue, 11 Jun 2002 13:38:51 +0000 (13:38 +0000)
since the URLopener base class does and **kwargs are used in urlopen.

Lib/urllib.py

index 381d54ec9d9b3a504138976d66749ff2afd64645..4d686b911ba15a917fb6fab5e41b1ff61bdb1571 100644 (file)
@@ -538,8 +538,8 @@ class URLopener:
 class FancyURLopener(URLopener):
     """Derived class with handlers for errors we can handle (perhaps)."""
 
-    def __init__(self, *args):
-        apply(URLopener.__init__, (self,) + args)
+    def __init__(self, *args, **kwargs):
+        apply(URLopener.__init__, (self,) + args, kwargs)
         self.auth_cache = {}
         self.tries = 0
         self.maxtries = 10