diff options
author | Guido van Rossum <guido@python.org> | 2007-12-06 19:05:55 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-12-06 19:05:55 (GMT) |
commit | e6650f91ea2960f368f9eeec66e562b93c5b4133 (patch) | |
tree | 550684cb268bd8a1676e11d6a08da0d22faeb0c7 /Lib/ssl.py | |
parent | 03b5c9ae7587cfac1c1b6be22ee5d2f7f854d68b (diff) | |
download | cpython-e6650f91ea2960f368f9eeec66e562b93c5b4133.zip cpython-e6650f91ea2960f368f9eeec66e562b93c5b4133.tar.gz cpython-e6650f91ea2960f368f9eeec66e562b93c5b4133.tar.bz2 |
Reverting revision 59394. We'll sort this out later.
Diffstat (limited to 'Lib/ssl.py')
-rw-r--r-- | Lib/ssl.py | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -148,10 +148,6 @@ class SSLSocket(socket): self.do_handshake_on_connect = do_handshake_on_connect self.suppress_ragged_eofs = suppress_ragged_eofs - # See Modules/_ssl.c:PySSL_dealloc() - # def __del__(self): - # self._real_close() - def dup(self): raise NotImplemented("Can't dup() %s instances" % self.__class__.__name__) @@ -304,7 +300,6 @@ class SSLSocket(socket): socket.shutdown(self, how) def _real_close(self): - # real close is called by Modules/_ssl.c:PySSL_dealloc() self._sslobj = None # self._closed = True if self._base: @@ -353,6 +348,10 @@ class SSLSocket(socket): self.do_handshake_on_connect), addr) + + def __del__(self): + self._real_close() + def wrap_socket(sock, keyfile=None, certfile=None, server_side=False, cert_reqs=CERT_NONE, ssl_version=PROTOCOL_SSLv23, ca_certs=None, |