]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
guess 2.6 / 2.7 have different kwargs
authorKevin McCarthy <me@kevinmccarthy.org>
Mon, 2 Jul 2012 07:57:51 +0000 (21:57 -1000)
committerKevin McCarthy <me@kevinmccarthy.org>
Mon, 2 Jul 2012 07:57:51 +0000 (21:57 -1000)
vcr/stubs.py

index 0725a80afae3be849f5eafbea3cd0758daee93cb..894a69f830c299b6fa560fb239476fc7b490cbd2 100644 (file)
@@ -75,19 +75,16 @@ class VCRHTTPSConnection(HTTPSConnection):
     I frankly don't understand.
     """
 
-    def __init__(self, host, port=None, key_file=None, cert_file=None,
-                         strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
-                         source_address=None):
+    def __init__(self, *args, **kwargs):
         """
-        I override the init and copied a lot of the code from the parent
+        I overrode the init and copied a lot of the code from the parent
         class because HTTPConnection when this happens has been replaced
         by VCRHTTPConnection,  but doing it here lets us use the original
         one.
         """
-        HTTPConnection.__init__(self, host, port, strict, timeout,
-                                source_address)
-        self.key_file = key_file
-        self.cert_file = cert_file
+        HTTPConnection.__init__(self, *args, **kwargs)
+        self.key_file = kwargs.pop('key_file',None)
+        self.cert_file = kwargs.pop('cert_file',None)
         self._cassette = Cassette()
 
     def _load_old_response(self):