From f995aae318357ce8eda0057ba1c215374bd74a0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Bokros?= Date: Sun, 3 Dec 2017 18:59:35 +0100 Subject: [PATCH] Use meaningful names in EventHandler --- src/event_handlers/event_handler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/event_handlers/event_handler.py b/src/event_handlers/event_handler.py index b75cdc3..2e7b170 100644 --- a/src/event_handlers/event_handler.py +++ b/src/event_handlers/event_handler.py @@ -9,11 +9,11 @@ class EventHandler(EventHandlerBase): super().__init__(anchor, zmq_context) self.event_handler_function = event_handler_function - def wrapper(msg_parts, handler): + def event_handler_callback(msg_parts, handler_func): anchor, message = msg_parts data_json = json.loads(message) - response = handler(data_json, self) + response = handler_func(data_json, self) encoded_response = json.dumps(response).encode('utf-8') self.zmq_push_socket.send_multipart([anchor, encoded_response]) - self.zmq_sub_stream.on_recv(partial(wrapper, handler=event_handler_function)) + self.zmq_sub_stream.on_recv(partial(event_handler_callback, handler_func=event_handler_function))