Clean up confusing usage of data_json['data'] in TerminadoEventHandler

This commit is contained in:
Kristóf Tóth 2018-03-07 11:37:52 +01:00
parent cb7e8c5663
commit 6d59762e2b

View File

@ -23,8 +23,7 @@ class TerminadoEventHandler(TriggerlessEventHandler):
def handle_event(self, key, data_json): def handle_event(self, key, data_json):
log.debug('TerminadoEventHandler received event: {}'.format(data_json)) log.debug('TerminadoEventHandler received event: {}'.format(data_json))
data = data_json['data'] data_json['data'] = self.commands[data_json['data']['command']](data_json['data'])
data_json['data'] = self.commands[data['command']](data)
return data_json return data_json
def write(self, data): def write(self, data):