Skip to content

Commit

Permalink
Check for twisted version with SSL support
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Jeffrey committed Oct 29, 2015
1 parent c0eaf97 commit 44b3849
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions labrad/crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@


try:
from twisted.internet import ssl
TLS = True
import twisted
if twisted.__version__.split('.')[0] >= 14:
from twisted.internet import ssl
TLS = True
else:
logging.warning("Twisted version >= 14.0.0 required for SSL support. "
"Older versions don't support the platform CA roots.")
TLS = False
except ImportError:
logging.warning('pyOpenSSL not found. Without encryption you will only be '
'able to connect to the labrad manager on localhost.')
Expand Down

0 comments on commit 44b3849

Please sign in to comment.