Extract variable to silence retarded linter

This commit is contained in:
Kristóf Tóth 2018-04-14 23:15:44 +02:00
parent efb8af4cd1
commit 743fab366b

View File

@ -30,7 +30,8 @@ class TerminadoEventHandler(TriggerlessEventHandler):
def handle_event(self, message):
LOG.debug('TerminadoEventHandler received event: %s', message)
try:
message['data'] = self.commands[message['data']['command']](message['data'])
data = message['data']
message['data'] = self.commands[data['command']](data)
return message
except KeyError:
LOG.error('IGNORING MESSAGE: Invalid message received: %s', message)