Commits

clach04 committed 251a76a

Make SSL optional.

Comments (0)

Files changed (1)

 import os
 import sys
 import socket
-import ssl
+try:
+    import ssl
+except ImportError:
+    ssl = None
 import SocketServer
 import threading
 import select
 SKSYNC_PROTOCOL_RECURSIVE = '0\n'
 SKSYNC_PROTOCOL_NON_RECURSIVE = '1\n'
 
-
-SSL_VERSION = ssl.PROTOCOL_TLSv1
+if ssl:
+    SSL_VERSION = ssl.PROTOCOL_TLSv1
 
 
 class BaseSkSyncException(Exception):