File tree Expand file tree Collapse file tree 1 file changed +6
-21
lines changed Expand file tree Collapse file tree 1 file changed +6
-21
lines changed Original file line number Diff line number Diff line change @@ -147,27 +147,12 @@ def add_parser(self, subparsers: argparse._SubParsersAction):
147147 "serial port name for USB connection" ,
148148 )
149149
150- if hasattr (argparse , "BooleanOptionalAction" ):
151- # BooleanOptionalAction requires Python 3.9
152- parser .add_argument (
153- "--wait" ,
154- help = "wait for the program to complete before disconnecting" ,
155- action = argparse .BooleanOptionalAction ,
156- default = True ,
157- )
158- else :
159- parser .add_argument (
160- "--wait" ,
161- help = "wait for the program to complete before disconnecting (default)" ,
162- action = "store_true" ,
163- default = True ,
164- )
165- parser .add_argument (
166- "--no-wait" ,
167- help = "disconnect as soon as program is done downloading" ,
168- action = "store_false" ,
169- dest = "wait" ,
170- )
150+ parser .add_argument (
151+ "--wait" ,
152+ help = "wait for the program to complete before disconnecting" ,
153+ action = argparse .BooleanOptionalAction ,
154+ default = True ,
155+ )
171156
172157 async def run (self , args : argparse .Namespace ):
173158
You can’t perform that action at this time.
0 commit comments