Skip to content

Commit

Permalink
Fixed example code
Browse files Browse the repository at this point in the history
  • Loading branch information
kmvanbrunt committed Sep 7, 2021
1 parent 967a8ba commit 4c5bfc0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/help_categories.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import cmd2
from cmd2 import (
COMMAND_NAME,
argparse_custom,
)


Expand Down Expand Up @@ -55,7 +56,9 @@ def do_deploy(self, _):
"""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
Expand All @@ -72,7 +75,7 @@ def do_redeploy(self, _):
"""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')
Expand Down

0 comments on commit 4c5bfc0

Please sign in to comment.