Robert Brewer  committed 265d37e

Some Py2 fixups

  • Participants
  • Parent commits 870bbc8

Comments (0)

Files changed (2)

File cheroot/ssllib/

 import threading
 import time
-from cheroot import py2makefile
+from cheroot import errors, py2makefile
+from cheroot.ssllib import SSLAdapter
     from OpenSSL import SSL
                     return ""
                 errnum = e.args[0]
-                if is_reader and errnum in wsgiserver.socket_errors_to_ignore:
+                if is_reader and errnum in errors.socket_errors_to_ignore:
                     return ""
                 raise socket.error(errnum)
             except SSL.Error, e:
                 if thirdarg == 'http request':
                     # The client is talking HTTP to an HTTPS server.
-                    raise wsgiserver.NoSSLError()
+                    raise errors.NoSSLError()
-                raise wsgiserver.FatalSSLAlert(*e.args)
+                raise errors.FatalSSLAlert(*e.args)
-class pyOpenSSLAdapter(wsgiserver.SSLAdapter):
+class pyOpenSSLAdapter(SSLAdapter):
     """A wrapper for integrating pyOpenSSL with Cheroot."""
     context = None

File cheroot/test/

 class SSLTest(helper.CherootWebCase):
-    config = {"ssl_adapter": helper.get_default_ssl_adapter()}
     def setup_server(cls):
         class Root(helper.Controller):
                 return "hello"
         cls.httpserver.wsgi_app = Root()
+        cls.httpserver.ssl_adapter = helper.get_default_ssl_adapter()
     setup_server = classmethod(setup_server)
     def test_normal(self):