mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 22:11:32 +00:00
Unify (key, response) ordering
This commit is contained in:
parent
38ca56fa9d
commit
fd1cb100ad
@ -30,8 +30,7 @@ class TFWServer:
|
||||
except AttributeError: return False
|
||||
|
||||
def fsm_callback(self, kwargs_dict):
|
||||
response, key = self.generate_fsm_update() # TODO: unify (key,response) order
|
||||
self.uplink.send(key, response)
|
||||
self.uplink.send(*self.generate_fsm_update())
|
||||
|
||||
def generate_fsm_update(self):
|
||||
key = 'FSMUpdate'
|
||||
@ -39,7 +38,7 @@ class TFWServer:
|
||||
'data': {'current_state': self.fsm.state,
|
||||
'valid_transitions':
|
||||
[{'trigger': trigger} for trigger in self.fsm.machine.get_triggers(self.fsm.state)]}}
|
||||
return response, key
|
||||
return key, response
|
||||
|
||||
def listen(self, port):
|
||||
self.application.listen(port)
|
||||
|
Loading…
Reference in New Issue
Block a user