Commit a31a0298 authored by Denis Bilenko's avatar Denis Bilenko

wsgi.WSGIServer: rename socket_or_address parameter to listener; use explicit...

wsgi.WSGIServer: rename socket_or_address parameter to listener; use explicit arguments instead of **kwargs
parent 21e99114
......@@ -136,12 +136,13 @@ class WSGIServer(HTTPServer):
'wsgi.multiprocess': False,
'wsgi.run_once': False}
def __init__(self, socket_or_address, application, **kwargs):
handler_class = kwargs.pop('handler_class', None)
def __init__(self, listener, application, backlog=None, handler_class=None, spawn='default'):
if hasattr(listener, 'do_handshake'):
raise TypeError('%s.start() requires a regular socket, not SSLObject: %r' % (self.__class__.__name__, listener))
if handler_class is not None:
self.handler_class = handler_class
HTTPServer.__init__(self, **kwargs)
self.address = socket_or_address
HTTPServer.__init__(self, spawn=spawn, backlog=backlog)
self.address = listener
self.application = application
@property
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment