1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-18 20:11:20 +00:00

framework/command: Fix subparsers in Python3

Make subcommands required arguments in the ComplexCommand class, which
is used by the 'wa create' command.
This commit is contained in:
Waleed El-Geresy 2018-06-14 13:53:21 +01:00 committed by setrofim
parent 6ee40c2170
commit 71a32dd724

View File

@ -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)