summaryrefslogtreecommitdiff
path: root/docs/features/modular_commands.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/features/modular_commands.rst')
-rw-r--r--docs/features/modular_commands.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/features/modular_commands.rst b/docs/features/modular_commands.rst
index 4c7286b7..9823d3ac 100644
--- a/docs/features/modular_commands.rst
+++ b/docs/features/modular_commands.rst
@@ -314,10 +314,10 @@ command and each CommandSet
@with_argparser(cut_parser)
def do_cut(self, ns: argparse.Namespace):
- func = getattr(ns, 'handler', None)
- if func is not None:
+ handler = ns.get_handler()
+ if handler is not None:
# Call whatever subcommand function was selected
- func(ns)
+ handler(ns)
else:
# No subcommand was provided, so call help
self.poutput('This command does nothing without sub-parsers registered')