From ea0785a6396a7722ef6af63ac3f3e9c267ed66df Mon Sep 17 00:00:00 2001 From: alterNERDtive Date: Wed, 15 Jan 2020 09:19:36 +0100 Subject: [PATCH] =?UTF-8?q?=E2=80=A6=20or=20just=20do=20it=20right=20in=20?= =?UTF-8?q?the=20first=20place?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- explorationtools.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/explorationtools.py b/explorationtools.py index c8e6ce7..2d4d97d 100755 --- a/explorationtools.py +++ b/explorationtools.py @@ -63,7 +63,7 @@ def getSystemNear(name): parser = argparse.ArgumentParser(description="A collection of tools useful for " + "exploration.") subparsers = parser.add_subparsers(title="subcommands", help="sub-command help", - dest="subCommand") + dest="subcommand", required=True) parser_bodycount = subparsers.add_parser("bodycount", help="Returns the number of bodies in a system. Will exit with code 1 on " @@ -123,9 +123,6 @@ try: out = getSystemNear(args.system) elif args.subCommand == "systemlist": out = getSystemList(args.partialsystem) - else: - parser.print_usage(sys.stderr) - sys.exit(1) except ServerError as e: print(e) sys.exit(1)