[SWDEV-498507] Tool amd-smi could be more case insensitive
Modified amdsmi_cli to accept case insensitive arguments if the argument does not start with a single dash(-). Signed-off-by: Bindhiya Kanangot Balakrishnan <Bindhiya.KanangotBalakrishnan@amd.com> Change-Id: I1b6320db0afaad0900d5a2049206002c3899fa71
This commit is contained in:
committed by
Maisam Arif
parent
664ade7354
commit
fc7e1ddb4a
@@ -100,6 +100,8 @@ if __name__ == "__main__":
|
||||
except NameError:
|
||||
logging.debug("argcomplete module not found. Autocomplete will not work.")
|
||||
|
||||
sys.argv = [arg.lower() if arg.startswith('--') or not arg.startswith('-')
|
||||
else arg for arg in sys.argv]
|
||||
args = amd_smi_parser.parse_args(args=None if sys.argv[1:] else ['--help'])
|
||||
|
||||
# Handle command modifiers before subcommand execution
|
||||
|
||||
Reference in New Issue
Block a user