From f5db99f079641930b3b245902d393a489c5c8f17 Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Sat, 8 Mar 2014 21:39:11 -1000 Subject: [PATCH] need the sock for httplib2, don't want sock for requests, can't we all just get along? --- vcr/stubs/__init__.py | 1 - vcr/stubs/httplib2_stubs.py | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) 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 -- 2.43.0