diff options
Diffstat (limited to 'Lib/socket.py')
| -rw-r--r-- | Lib/socket.py | 7 | 
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/socket.py b/Lib/socket.py index 45a122f..48bb4f6 100644 --- a/Lib/socket.py +++ b/Lib/socket.py @@ -68,11 +68,10 @@ if _have_ssl:  _realsocket = socket  if _have_ssl: -    _realssl = ssl      def ssl(sock, keyfile=None, certfile=None): -        if hasattr(sock, "_sock"): -            sock = sock._sock -        return _realssl(sock, keyfile, certfile) +        import ssl as realssl +        return realssl.sslwrap_simple(sock, keyfile, certfile) +    __all__.append("ssl")  # WSA error codes  if sys.platform.lower().startswith("win"):  | 
