From: Guido van Rossum Date: Fri, 16 Nov 2007 01:28:45 +0000 (+0000) Subject: Disable dup() of SSLSocket. I don't think it can be made to work. X-Git-Tag: v3.0a2~167 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b7b030ec37bd688d5c3ab2c4a4f28d0544656f99;p=thirdparty%2FPython%2Fcpython.git Disable dup() of SSLSocket. I don't think it can be made to work. --- diff --git a/Lib/ssl.py b/Lib/ssl.py index 9d63d12ce3ba..0161efaa992a 100644 --- a/Lib/ssl.py +++ b/Lib/ssl.py @@ -140,6 +140,10 @@ class SSLSocket(socket): self.do_handshake_on_connect = do_handshake_on_connect self.suppress_ragged_eofs = suppress_ragged_eofs + def dup(self): + raise NotImplemented("Can't dup() %s instances" % + self.__class__.__name__) + def _checkClosed(self, msg=None): # raise an exception here if you wish to check for spurious closes pass