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:
@@ -1054,11 +1054,6 @@ class _HTTPSConnection(http_client.HTTPSConnection):
|
|||||||
# dercert = self.sock.getpeercert(False)
|
# dercert = self.sock.getpeercert(False)
|
||||||
# # pemcert = ssl.DER_cert_to_PEM_cert(dercert)
|
# # 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
|
## Stand-in for the HTTPSConnection class that will connect to a proxy and
|
||||||
## issue a CONNECT command to start an SSL tunnel.
|
## issue a CONNECT command to start an SSL tunnel.
|
||||||
class SSLTunnelConnection(object):
|
class SSLTunnelConnection(object):
|
||||||
|
|||||||
Reference in New Issue
Block a user