File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 2525"""
2626
2727import argparse
28- import sys
2928from functools import partial
3029from importlib import import_module # type: ignore
3130from typing import List
@@ -103,7 +102,7 @@ def get_argument_parser() -> argparse.ArgumentParser:
103102 "animate" ,
104103 help = (
105104 "animate a robot description by interpolating "
106- "each joint between its limits" ,
105+ "each joint between its limits"
107106 ),
108107 )
109108 parser_animate .add_argument (
@@ -205,13 +204,11 @@ def main(argv=None):
205204 """
206205 parser = get_argument_parser ()
207206 args = parser .parse_args (argv )
208- if args .subcmd is None :
209- parser .print_help ()
210- sys .exit (- 1 )
211-
212207 if args .subcmd == "list" :
213208 print ("\n " .join (DESCRIPTION_NAMES ))
214209 elif args .subcmd == "show" :
215210 show (args .name , args .configuration , args .collision )
216211 elif args .subcmd == "animate" :
217212 animate (args .name , args .collision , args .loop_time )
213+ else : # no subcommand
214+ parser .print_help ()
You can’t perform that action at this time.
0 commit comments