From: Kevin McCarthy Date: Sun, 9 Mar 2014 07:39:11 +0000 (-1000) Subject: need the sock for httplib2, don't want sock for requests, can't we all just get along? X-Git-Tag: v0.7.0~5 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=f5db99f079641930b3b245902d393a489c5c8f17;p=vcrpy.git need the sock for httplib2, don't want sock for requests, can't we all just get along? --- diff --git a/vcr/stubs/__init__.py b/vcr/stubs/__init__.py index d80070c..63d4610 100644 --- a/vcr/stubs/__init__.py +++ b/vcr/stubs/__init__.py @@ -222,7 +222,6 @@ class VCRConnection: reset() self.real_connection = self._baseclass(*args, **kwargs) install(self.cassette) - self.sock = self.real_connection.sock class VCRHTTPConnection(VCRConnection): diff --git a/vcr/stubs/httplib2_stubs.py b/vcr/stubs/httplib2_stubs.py index 4bfec24..ad74400 100644 --- a/vcr/stubs/httplib2_stubs.py +++ b/vcr/stubs/httplib2_stubs.py @@ -21,6 +21,7 @@ class VCRHTTPConnectionWithTimeout(VCRHTTPConnection, self.proxy_info = kwargs.pop('proxy_info', None) VCRHTTPConnection.__init__(self, *args, **safe_kwargs) + self.sock = self.real_connection.sock class VCRHTTPSConnectionWithTimeout(VCRHTTPSConnection, @@ -49,3 +50,4 @@ class VCRHTTPSConnectionWithTimeout(VCRHTTPSConnection, self.disable_ssl_certificate_validation = kwargs.pop( 'disable_ssl_certificate_validation', None) VCRHTTPSConnection.__init__(self, *args, **safe_kwargs) + self.sock = self.real_connection.sock