mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2025-07-14 00:46:23 +00:00
Comply EventHandler changes
This commit is contained in:
@ -6,9 +6,8 @@ from signal import signal, SIGTERM, SIGINT
|
||||
from tornado.ioloop import IOLoop
|
||||
|
||||
from tfw.fsm import YamlFSM
|
||||
from tfw.event_handlers import EventHandlerBase, FSMAwareEventHandler, TFWServerUplinkConnector
|
||||
from tfw.builtins import FrontendEventHandler
|
||||
from tfw.builtins import IdeEventHandler, TerminalEventHandler
|
||||
from tfw.builtins import EventHandler, FSMAwareEventHandler, TFWServerUplinkConnector
|
||||
from tfw.builtins import IdeEventHandler, TerminalEventHandler, FrontendEventHandler
|
||||
from tfw.builtins import LogMonitoringEventHandler, ProcessManagingEventHandler
|
||||
from tfw.builtins import DirectorySnapshottingEventHandler, FSMManagingEventHandler, MessageSender
|
||||
from tfw.components import TerminalCommands
|
||||
@ -19,7 +18,7 @@ from tao.config import TAOENV
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TerminalCallbackEventHandler(EventHandlerBase):
|
||||
class TerminalCallbackEventHandler(EventHandler):
|
||||
"""
|
||||
Logs commands executed in terminal to messages and invokes an
|
||||
additional callback function to handle special commands.
|
||||
@ -162,8 +161,8 @@ def main():
|
||||
key='test'
|
||||
)
|
||||
|
||||
event_handlers = EventHandlerBase.get_local_instances()
|
||||
def stop(sig, frame):
|
||||
event_handlers = EventHandler.get_local_instances()
|
||||
def stop(sig, frame): # pylint: disable=unused-argument
|
||||
for eh in event_handlers:
|
||||
eh.stop()
|
||||
exit(0)
|
||||
|
Reference in New Issue
Block a user