From 774fb39d7e259d0679c573b0d893293f9ed9aed9 Mon Sep 17 00:00:00 2001 From: Eric Lin Date: Wed, 12 Aug 2020 13:08:59 -0400 Subject: Breaking change: Removed cmd2 app as a required second parameter to CommandSet command functions (do_, complete_, help_). Renamed install_command_set and uninstall_command_set to register_command_set and unregister_command_set. --- examples/modular_commands_basic.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/modular_commands_basic.py') diff --git a/examples/modular_commands_basic.py b/examples/modular_commands_basic.py index 9f4a0bd2..b9d4c4a2 100644 --- a/examples/modular_commands_basic.py +++ b/examples/modular_commands_basic.py @@ -13,11 +13,11 @@ class AutoLoadCommandSet(CommandSet): def __init__(self): super().__init__() - def do_hello(self, cmd: cmd2.Cmd, _: cmd2.Statement): - cmd.poutput('Hello') + def do_hello(self, _: cmd2.Statement): + self._cmd.poutput('Hello') - def do_world(self, cmd: cmd2.Cmd, _: cmd2.Statement): - cmd.poutput('World') + def do_world(self, _: cmd2.Statement): + self._cmd.poutput('World') class ExampleApp(cmd2.Cmd): -- cgit v1.2.1