mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 10:11:17 +00:00
fw/entrypoint: make command mandatory for Python 3
Python 3 has changed the behavior of subparsers so that they are no longer mandatory by default. As a result, executing just "wa" under Python 3 results in a random error, rather than a help message. Fix this by making the subparsers mandatory.
This commit is contained in:
parent
503005ba5f
commit
0ca29bb337
@ -101,7 +101,9 @@ def main():
|
|||||||
logger.debug('Command Line: {}'.format(' '.join(sys.argv)))
|
logger.debug('Command Line: {}'.format(' '.join(sys.argv)))
|
||||||
|
|
||||||
# each command will add its own subparser
|
# each command will add its own subparser
|
||||||
commands = load_commands(parser.add_subparsers(dest='command'))
|
subparsers = parser.add_subparsers(dest='command')
|
||||||
|
subparsers.required = True
|
||||||
|
commands = load_commands(subparsers)
|
||||||
args = parser.parse_args(argv)
|
args = parser.parse_args(argv)
|
||||||
|
|
||||||
config = ConfigManager()
|
config = ConfigManager()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user