File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 10
10
import cmd2
11
11
from cmd2 import (
12
12
COMMAND_NAME ,
13
+ argparse_custom ,
13
14
)
14
15
15
16
@@ -55,7 +56,9 @@ def do_deploy(self, _):
55
56
"""Deploy command"""
56
57
self .poutput ('Deploy' )
57
58
58
- start_parser = cmd2 .DEFAULT_ARGUMENT_PARSER (description = 'Start' , epilog = 'my_decorator runs even with argparse errors' )
59
+ start_parser = argparse_custom .DEFAULT_ARGUMENT_PARSER (
60
+ description = 'Start' , epilog = 'my_decorator runs even with argparse errors'
61
+ )
59
62
start_parser .add_argument ('when' , choices = START_TIMES , help = 'Specify when to start' )
60
63
61
64
@my_decorator
@@ -72,7 +75,7 @@ def do_redeploy(self, _):
72
75
"""Redeploy command"""
73
76
self .poutput ('Redeploy' )
74
77
75
- restart_parser = cmd2 .DEFAULT_ARGUMENT_PARSER (
78
+ restart_parser = argparse_custom .DEFAULT_ARGUMENT_PARSER (
76
79
description = 'Restart' , epilog = 'my_decorator does not run when argparse errors'
77
80
)
78
81
restart_parser .add_argument ('when' , choices = START_TIMES , help = 'Specify when to restart' )
You can’t perform that action at this time.
0 commit comments