From 4058325487372d2906e9ab5790a373d747a13820 Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Fri, 3 Sep 2021 13:10:33 -0400 Subject: Fixed example code --- examples/help_categories.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/help_categories.py b/examples/help_categories.py index c5c9af86..b2a1623f 100755 --- a/examples/help_categories.py +++ b/examples/help_categories.py @@ -10,6 +10,7 @@ import functools import cmd2 from cmd2 import ( COMMAND_NAME, + argparse_custom, ) @@ -55,7 +56,9 @@ class HelpCategories(cmd2.Cmd): """Deploy command""" self.poutput('Deploy') - start_parser = cmd2.DEFAULT_ARGUMENT_PARSER(description='Start', epilog='my_decorator runs even with argparse errors') + start_parser = argparse_custom.DEFAULT_ARGUMENT_PARSER( + description='Start', epilog='my_decorator runs even with argparse errors' + ) start_parser.add_argument('when', choices=START_TIMES, help='Specify when to start') @my_decorator @@ -72,7 +75,7 @@ class HelpCategories(cmd2.Cmd): """Redeploy command""" self.poutput('Redeploy') - restart_parser = cmd2.DEFAULT_ARGUMENT_PARSER( + restart_parser = argparse_custom.DEFAULT_ARGUMENT_PARSER( description='Restart', epilog='my_decorator does not run when argparse errors' ) restart_parser.add_argument('when', choices=START_TIMES, help='Specify when to restart') -- cgit v1.2.1