From 71a32dd724f510a0de44ade1592c1c13368e73b6 Mon Sep 17 00:00:00 2001 From: Waleed El-Geresy Date: Thu, 14 Jun 2018 13:53:21 +0100 Subject: [PATCH] framework/command: Fix subparsers in Python3 Make subcommands required arguments in the ComplexCommand class, which is used by the 'wa create' command. --- wa/framework/command.py | 1 + 1 file changed, 1 insertion(+) diff --git a/wa/framework/command.py b/wa/framework/command.py index 7397c794..3a8c7730 100644 --- a/wa/framework/command.py +++ b/wa/framework/command.py @@ -111,6 +111,7 @@ class ComplexCommand(Command): def initialize(self, context): subparsers = self.parser.add_subparsers(dest='what', metavar='SUBCMD') + subparsers.required = True for subcmd_cls in self.subcmd_classes: subcmd = subcmd_cls(self.logger, subparsers) self.subcommands.append(subcmd)