Commits

Robert Brewer committed 0313ff3

Fixed #1083 (cherrypy requires ssl to startup)

  • Participants
  • Parent commits 12f7785

Comments (0)

Files changed (1)

File cherrypy/_cpcompat.py

     from http.server import BaseHTTPRequestHandler
 
 try:
+    # Python 2. We have to do it in this order so Python 2 builds
+    # don't try to import the 'http' module from cherrypy.lib
+    from httplib import HTTPSConnection
+except ImportError:
+    try:
+        # Python 3
+        from http.client import HTTPSConnection
+    except ImportError:
+        # Some platforms which don't have SSL don't expose HTTPSConnection
+        HTTPSConnection = None
+
+try:
     # Python 2
     xrange = xrange
 except NameError: