better check for SSL support using socket.ssl
This commit is contained in:
parent
097027a3d4
commit
e1e8861a6e
1 changed files with 3 additions and 1 deletions
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue