]> granicus.if.org Git - python/commitdiff
Extend __all__ with the exports list of the _ssl module.
authorGuido van Rossum <guido@python.org>
Thu, 8 Aug 2002 15:25:28 +0000 (15:25 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 8 Aug 2002 15:25:28 +0000 (15:25 +0000)
Lib/socket.py

index b9e36da29fe4deadcaf0aece78870283b62c1154..6c39d76e106c0e9f2b0edb9c653fdbbee916a3c1 100644 (file)
@@ -45,6 +45,7 @@ from _socket import *
 
 _have_ssl = False
 try:
+    import _ssl
     from _ssl import *
     _have_ssl = True
 except ImportError:
@@ -54,7 +55,8 @@ import os, sys
 
 __all__ = ["getfqdn"]
 __all__.extend(os._get_exports_list(_socket))
-# XXX shouldn't there be something similar to the above for _ssl exports?
+if _have_ssl:
+    __all__.extend(os._get_exports_list(_ssl))
 
 _realsocket = socket
 _needwrapper = False
@@ -90,6 +92,7 @@ if sys.platform.lower().startswith("win"):
     errorTab[10064] = "The host is down."
     errorTab[10065] = "The host is unreachable."
     __all__.append("errorTab")
+
 del os, sys