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
try:
import ssl
import socket
socket.ssl
HAS_SSL = True
except ImportError:
except (ImportError, AttributeError):
from subprocess import Popen
if HAS_SSL: