mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-19 04:21:17 +00:00
bd23202dca
In order to properly enable verbose logging for plugin enumeration, verbosity option must be extracted before commands are processed, and therefore before all valid arguments are known. ArgumentParser.parse_known_args() is used for this, which will collect all unexpected arguments into an "extras" list, rather than raising an error. This, however, has an outstanding bug, where if say option '-v' is known and '-f is unknown, args '-v -f' will be parsed correctly (with '-f' being collected into extras), but '-vf' will not, resulting in an error. To get around this, pre-process sys.argv to detect joined options and manually split them into separate args.