From ac510097e0a9640d2e525c17accb2de2bb3875a3 Mon Sep 17 00:00:00 2001 From: Tye Wang Date: Fri, 18 Sep 2015 12:19:17 -0400 Subject: [PATCH] Add TODO and elaborate on comment --- vcr/stubs/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vcr/stubs/__init__.py b/vcr/stubs/__init__.py index f266ecf..0d9af5d 100644 --- a/vcr/stubs/__init__.py +++ b/vcr/stubs/__init__.py @@ -323,10 +323,15 @@ class VCRConnection(object): For example, urllib3 will set certain attributes on the connection, such as 'ssl_version'. These attributes need to get set on the real connection to have the correct and expected behavior. + + TODO: Separately setting the attribute on the two instances is not + ideal. We should switch to a proxying implementation. """ try: setattr(self.real_connection, name, value) - except AttributeError: # raised if real_connection has not been set yet + except AttributeError: + # raised if real_connection has not been set yet, such as when + # we're setting the real_connection itself for the first time pass super(VCRConnection, self).__setattr__(name, value)