summaryrefslogtreecommitdiff
path: root/examples/arg_print.py
diff options
context:
space:
mode:
authorEric Lin <anselor@gmail.com>2020-08-04 13:46:48 -0400
committeranselor <anselor@gmail.com>2020-08-04 15:24:53 -0400
commit1a82b37b6c23490b1d9127095e3ee4f2db21a85b (patch)
treeeb45b08c177ec9d032436af5d158a0ad065dc967 /examples/arg_print.py
parentc983abaa881a3ac6110a90194def660489b2d5cc (diff)
downloadcmd2-git-1a82b37b6c23490b1d9127095e3ee4f2db21a85b.tar.gz
Marked with_arparser_and_unknown_args deprecated and consolidated
implementation as an option to with_argparser instead.
Diffstat (limited to 'examples/arg_print.py')
-rwxr-xr-xexamples/arg_print.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/arg_print.py b/examples/arg_print.py
index 3f7f3815..dbf740ff 100755
--- a/examples/arg_print.py
+++ b/examples/arg_print.py
@@ -56,7 +56,7 @@ class ArgumentAndOptionPrinter(cmd2.Cmd):
pprint_parser.add_argument('-s', '--shout', action='store_true', help='N00B EMULATION MODE')
pprint_parser.add_argument('-r', '--repeat', type=int, help='output [n] times')
- @cmd2.with_argparser_and_unknown_args(pprint_parser)
+ @cmd2.with_argparser(pprint_parser, with_unknown_args=True)
def do_pprint(self, args, unknown):
"""Print the options and argument list this options command was called with."""
self.poutput('oprint was called with the following\n\toptions: {!r}\n\targuments: {}'.format(args, unknown))