mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-11-14 02:47:17 +00:00
Extend docstrings in event_handler_main
This commit is contained in:
parent
23a64a4553
commit
6ff39e9739
@ -13,6 +13,10 @@ LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def cenator(history):
|
||||
"""
|
||||
Logs commands executed in terminal to messages.
|
||||
!! Please remove from production code. !!
|
||||
"""
|
||||
LOG.debug('User executed command: "%s"', history[-1])
|
||||
MessageSender().send('JOHN CENA', f'You\'ve executed "{history[-1]}"')
|
||||
|
||||
@ -20,7 +24,7 @@ def cenator(history):
|
||||
class TestCommands(TerminalCommands):
|
||||
"""
|
||||
Some example commands useful for debugging.
|
||||
Please remove from production code and inherit your own
|
||||
!! Please remove from production code !! and inherit your own
|
||||
class from TerminalCommands if you need to define custom
|
||||
commands in your challenge.
|
||||
"""
|
||||
@ -92,8 +96,6 @@ if __name__ == '__main__':
|
||||
)
|
||||
eventhandlers = {ide, terminal, processmanager, logmonitor}
|
||||
|
||||
terminal.historymonitor.subscribe_callback(cenator)
|
||||
|
||||
commands = TestCommands(bashrc=f'/home/{TAOENV.USER}/.bashrc')
|
||||
terminal.historymonitor.subscribe_callback(commands.callback)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user