[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:
Bindhiya Kanangot Balakrishnan authored and Maisam Arif committed 2024-12-02 18:09:45 -05:00
1 parent 664ade7354
commit fc7e1ddb4a
2 files changed
+21

No files matched your search

+2
View File
@@ -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