mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-03-22 10:38:37 +00:00
fw/entrypoint: Fix help information for '--help' argument
In a previous commit we filtered parameters so that '-h' is never passed to 'parse_known_commands' to ensure our own custom help message is displayed, now also filter for '--help' for the same reason.
This commit is contained in:
parent
6d9ae419c2
commit
c3ddb31d4d
@ -86,11 +86,13 @@ def main():
|
|||||||
argv = split_joined_options(sys.argv[1:])
|
argv = split_joined_options(sys.argv[1:])
|
||||||
|
|
||||||
# 'Parse_known_args' automatically displays the default help and exits
|
# 'Parse_known_args' automatically displays the default help and exits
|
||||||
# if '-h' is detected, we want our custom help messages so ensure this
|
# if '-h' or '--help' is detected, we want our custom help messages so
|
||||||
# is never passed as a parameter.
|
# ensure these are never passed as parameters.
|
||||||
filtered_argv = list(argv)
|
filtered_argv = list(argv)
|
||||||
if '-h' in filtered_argv:
|
if '-h' in filtered_argv:
|
||||||
filtered_argv.remove('-h')
|
filtered_argv.remove('-h')
|
||||||
|
elif '--help' in filtered_argv:
|
||||||
|
filtered_argv.remove('--help')
|
||||||
|
|
||||||
args, _ = parser.parse_known_args(filtered_argv)
|
args, _ = parser.parse_known_args(filtered_argv)
|
||||||
settings.set("verbosity", args.verbose)
|
settings.set("verbosity", args.verbose)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user