SocketMiddleware.__call__: initialize `environment`

This commit is contained in:
Eric Hanchrow 2013-12-13 11:31:31 -08:00
parent 321bad35d9
commit 122744178f

View file

@ -32,6 +32,8 @@ class SocketMiddleware(object):
def __call__(self, environ, start_response):
path = environ['PATH_INFO']
environment = None
if path in self.ws.url_map:
handler = self.ws.url_map[path]
environment = environ.get('wsgi.websocket')