]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Use super() to call super "__init__()" 1593/head
authorGunWoo Choi <Hardtack@users.noreply.github.com>
Tue, 24 Nov 2015 05:12:07 +0000 (14:12 +0900)
committerGunWoo Choi <Hardtack@users.noreply.github.com>
Tue, 24 Nov 2015 05:12:07 +0000 (14:12 +0900)
Calling super method by Request.__init__(self) cannot handle MRO properly.

tornado/websocket.py

index 11e526687dc149c94d27133344c1a4f897d01bfa..f5e3dbd7f80a6d939c3323396c89afca28ee410f 100644 (file)
@@ -128,8 +128,7 @@ class WebSocketHandler(tornado.web.RequestHandler):
     to accept it before the websocket connection will succeed.
     """
     def __init__(self, application, request, **kwargs):
-        tornado.web.RequestHandler.__init__(self, application, request,
-                                            **kwargs)
+        super(WebSocketHandler, self).__init__(application, request, **kwargs)
         self.ws_connection = None
         self.close_code = None
         self.close_reason = None