1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-19 04:21: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:
Sergei Trofimov 2018-06-13 08:54:50 +01:00 committed by setrofim
parent 503005ba5f
commit 0ca29bb337

View File

@ -101,7 +101,9 @@ def main():
logger.debug('Command Line: {}'.format(' '.join(sys.argv)))
# 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)
config = ConfigManager()