diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2016-11-09 14:17:14 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-11-14 18:14:29 +0900 |
commit | 99ebbcce0e72f2a6b52f3d0190287747409d105b (patch) | |
tree | 35b7eca0e477f31b920054ec1566aa0d06366b9d | |
parent | ffa736a8357c7d82bc88ce62fce4de166a0c0bd4 (diff) |
wsgi: Reduce pylint warnings
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/app/wsgi.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ryu/app/wsgi.py b/ryu/app/wsgi.py index fbfa0e79..1e19fed0 100644 --- a/ryu/app/wsgi.py +++ b/ryu/app/wsgi.py @@ -17,6 +17,8 @@ import inspect from types import MethodType +from routes import Mapper +from routes.util import URLGenerator import six from tinyrpc.server import RPCServer from tinyrpc.dispatch import RPCDispatcher @@ -25,12 +27,11 @@ from tinyrpc.protocols.jsonrpc import JSONRPCProtocol from tinyrpc.transports import ServerTransport, ClientTransport from tinyrpc.client import RPCClient import webob.dec +import webob.exc from webob.response import Response from ryu import cfg from ryu.lib import hub -from routes import Mapper -from routes.util import URLGenerator CONF = cfg.CONF @@ -82,7 +83,7 @@ class _AlreadyHandledResponse(Response): def websocket(name, path): def _websocket(controller_func): - def __websocket(self, req, **kwargs): + def __websocket(self, req, **_): wrapper = WebSocketRegistrationWrapper(controller_func, self) ws_wsgi = hub.WebSocketWSGI(wrapper) ws_wsgi(req.environ, req.start_response) @@ -107,6 +108,7 @@ class ControllerBase(object): def __init__(self, req, link, data, **config): self.req = req self.link = link + self.data = data self.parent = None for name, value in config.items(): setattr(self, name, value) @@ -137,7 +139,7 @@ class WebSocketServerTransport(ServerTransport): if message is None: raise WebSocketDisconnectedError() context = None - return (context, message) + return context, message def send_reply(self, context, reply): self.ws.send(six.text_type(reply)) |