Fix #487: Remove custom __getattr__ in _HTTPSConnection

This prevents maximum recursion depth errors when referencing _HTTPSConnection.connect. The custom __getattr__ was a leftover from 21a5d52e6a which removed the self._wrapped attribute.
This commit is contained in:
Johan Nordevall
2017-01-25 12:39:04 -08:00
committed by GitHub
parent 36291a3775
commit 31f1e34498

View File

@@ -1054,11 +1054,6 @@ class _HTTPSConnection(http_client.HTTPSConnection):
# dercert = self.sock.getpeercert(False)
# # pemcert = ssl.DER_cert_to_PEM_cert(dercert)
def __getattr__(self, item):
if item == 'connect':
return self.connect(self._wrapped)
return getattr(self._wrapped, item)
## Stand-in for the HTTPSConnection class that will connect to a proxy and
## issue a CONNECT command to start an SSL tunnel.
class SSLTunnelConnection(object):