summaryrefslogtreecommitdiff
path: root/examples/subcommands.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2018-05-25 12:35:24 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2018-05-25 12:35:24 -0400
commit4c67d3372db924e87be920d89aadecb946584b31 (patch)
treebf57a15570248a2e3fbfb058a817d6c743cc9167 /examples/subcommands.py
parent0e4131ba2616bd33c9cb5e93105dbd6d511a71ab (diff)
parentcad21a60fa92ebe4a7c177142d273f9f7497967b (diff)
downloadcmd2-git-4c67d3372db924e87be920d89aadecb946584b31.tar.gz
Merge branch 'master' into pyshell_readline
Diffstat (limited to 'examples/subcommands.py')
-rwxr-xr-xexamples/subcommands.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/subcommands.py b/examples/subcommands.py
index 55be7711..356c2e09 100755
--- a/examples/subcommands.py
+++ b/examples/subcommands.py
@@ -52,8 +52,7 @@ except ImportError:
# Intentionally below the bash completion code to reduce tab completion lag
-from cmd2 import cmd2
-from cmd2.cmd2 import with_argparser
+import cmd2
class SubcommandsExample(cmd2.Cmd):
@@ -83,7 +82,7 @@ class SubcommandsExample(cmd2.Cmd):
parser_bar.set_defaults(func=base_bar)
parser_sport.set_defaults(func=base_sport)
- @with_argparser(base_parser)
+ @cmd2.with_argparser(base_parser)
def do_base(self, args):
"""Base command help"""
func = getattr(args, 'func', None)