better check for SSL support using socket.ssl

This commit is contained in:
Alan Hamlett 2013-09-30 06:58:12 -07:00
parent 097027a3d4
commit e1e8861a6e

View File

@ -35,8 +35,10 @@ LOCK = threading.RLock()
# check if we have SSL support # check if we have SSL support
try: try:
import ssl import ssl
import socket
socket.ssl
HAS_SSL = True HAS_SSL = True
except ImportError: except (ImportError, AttributeError):
from subprocess import Popen from subprocess import Popen
if HAS_SSL: if HAS_SSL: