summaryrefslogtreecommitdiff
path: root/tests_isolated/test_commandset/test_commandset.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2020-08-27 13:44:24 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2020-08-27 13:44:24 -0400
commite650fc3defd7ddeb32eeadeeddccda370539ce1d (patch)
treea4809c8dcdbc3dcf4e1af624ba0e824f0a7c2861 /tests_isolated/test_commandset/test_commandset.py
parent5942f2105eb83140a8ab37e655e2561c4d17d3a2 (diff)
parente3a07c59b541b4a0b937c62ef38be6d8c011c0a3 (diff)
downloadcmd2-git-e650fc3defd7ddeb32eeadeeddccda370539ce1d.tar.gz
Merge branch 'master' into 2.0
Diffstat (limited to 'tests_isolated/test_commandset/test_commandset.py')
-rw-r--r--tests_isolated/test_commandset/test_commandset.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests_isolated/test_commandset/test_commandset.py b/tests_isolated/test_commandset/test_commandset.py
index f326a094..f32c9104 100644
--- a/tests_isolated/test_commandset/test_commandset.py
+++ b/tests_isolated/test_commandset/test_commandset.py
@@ -72,7 +72,7 @@ class CommandSetA(CommandSetBase):
@cmd2.with_argparser(main_parser)
def do_main(self, args: argparse.Namespace) -> None:
# Call handler for whatever subcommand was selected
- handler = args.get_handler()
+ handler = args.cmd2_handler.get()
handler(args)
# main -> sub
@@ -309,7 +309,7 @@ class LoadableBase(cmd2.CommandSet):
@cmd2.with_argparser(cut_parser)
def do_cut(self, ns: argparse.Namespace):
"""Cut something"""
- handler = ns.get_handler()
+ handler = ns.cmd2_handler.get()
if handler is not None:
# Call whatever subcommand function was selected
handler(ns)
@@ -329,7 +329,7 @@ class LoadableBase(cmd2.CommandSet):
self._cmd.poutput('Need to cut before stirring')
return
- handler = ns.get_handler()
+ handler = ns.cmd2_handler.get()
if handler is not None:
# Call whatever subcommand function was selected
handler(ns)
@@ -344,7 +344,7 @@ class LoadableBase(cmd2.CommandSet):
@cmd2.as_subcommand_to('stir', 'pasta', stir_pasta_parser)
def stir_pasta(self, ns: argparse.Namespace):
- handler = ns.get_handler()
+ handler = ns.cmd2_handler.get()
if handler is not None:
# Call whatever subcommand function was selected
handler(ns)
@@ -359,7 +359,7 @@ class LoadableBadBase(cmd2.CommandSet):
def do_cut(self, ns: argparse.Namespace):
"""Cut something"""
- handler = ns.get_handler()
+ handler = ns.cmd2_handler.get()
if handler is not None:
# Call whatever subcommand function was selected
handler(ns)
@@ -597,7 +597,7 @@ class AppWithSubCommands(cmd2.Cmd):
@cmd2.with_argparser(cut_parser)
def do_cut(self, ns: argparse.Namespace):
"""Cut something"""
- handler = ns.get_handler()
+ handler = ns.cmd2_handler.get()
if handler is not None:
# Call whatever subcommand function was selected
handler(ns)