Improve FSMAware api

This commit is contained in:
Kristóf Tóth 2019-06-28 15:16:08 +02:00
parent 78bd97493a
commit 481a919606
3 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ from .fsm_managing_event_handler import FSMManagingEventHandler
from .ide_event_handler import IdeEventHandler
from .log_monitoring_event_handler import LogMonitoringEventHandler
from .message_sender import MessageSender
#from .pipe_io_event_handler import PipeIOEventHandlerBase, PipeIOEventHandler
#from .pipe_io_event_handler import TransformerPipeIOEventHandler, CommandEventHandler
from .pipe_io_event_handler import PipeIOEventHandlerBase, PipeIOEventHandler
from .pipe_io_event_handler import TransformerPipeIOEventHandler, CommandEventHandler
from .process_managing_event_handler import ProcessManagingEventHandler
from .terminal_event_handler import TerminalEventHandler

View File

@ -21,6 +21,6 @@ class FSMAwareEventHandler(EventHandler, FSMAware, ABC):
self.subscribe('fsm_update')
def dispatch_handling(self, message):
if self.update_fsm_data(message):
if self.refresh_on_fsm_update(message):
return None
return super().dispatch_handling(message)

View File

@ -19,7 +19,7 @@ class FSMAware:
self.fsm_event_log = []
self._auth_key = KeyManager().auth_key
def update_fsm_data(self, message):
def refresh_on_fsm_update(self, message):
if message['key'] == 'fsm_update' and verify_message(self._auth_key, message):
self._handle_fsm_update(message)
return True