From 01b247e49474a9a01d185f4f3a86a185908b7a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Tue, 30 Jul 2019 15:17:47 +0200 Subject: [PATCH] Follow API changes --- solvable/src/custom_handlers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/solvable/src/custom_handlers.py b/solvable/src/custom_handlers.py index 96f4597..67e48d2 100644 --- a/solvable/src/custom_handlers.py +++ b/solvable/src/custom_handlers.py @@ -11,10 +11,10 @@ LOG = logging.getLogger(__name__) class CenatorHandler: keys = ['history.bash'] - def handle_event(self, message, server_connector): # pylint: disable=no-self-use + def handle_event(self, message, connector): # pylint: disable=no-self-use command = message['value'] LOG.debug('User executed command: "%s"', command) - MessageSender(server_connector).send('JOHN CENA', f'You\'ve executed "{command}"') + MessageSender(connector).send('JOHN CENA', f'You\'ve executed "{command}"') class TestCommandsHandler(TerminalCommandsHandler): @@ -33,12 +33,12 @@ class TestCommandsHandler(TerminalCommandsHandler): TFWUplinkConnector().send_message(literal_eval(args[0])) -def messageFSMStepsHandler(message, server_connector): +def messageFSMStepsHandler(message, connector): """ When the FSM steps this method is invoked. Receives a 'data' field from an fsm_update message as kwargs. """ - MessageSender(server_connector).send( + MessageSender(connector).send( 'FSM info', f'FSM has stepped from state "{message["last_event"]["from_state"]}" ' f'to state "{message["current_state"]}" in response to trigger "{message["last_event"]["trigger"]}"'