1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2024-12-05 02:31:33 +00:00

Extend docstrings in event_handler_main

This commit is contained in:
Kristóf Tóth 2018-05-31 14:19:47 +02:00
parent 23a64a4553
commit 6ff39e9739

View File

@ -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)