[SWDEV-529603] Fix subcommand aliasing
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I1c15faffa5fda1b8f5c2f5d6e4c7ae746ff8ee7c
[ROCm/amdsmi commit: 4099fee17f]
Этот коммит содержится в:
коммит произвёл
Arif, Maisam
родитель
cf3a1aceca
Коммит
c0cc1b3360
@@ -102,9 +102,9 @@ if __name__ == "__main__":
|
||||
except NameError:
|
||||
logging.debug("argcomplete module not found. Autocomplete will not work.")
|
||||
|
||||
valid_commands = ['version', 'list', 'static', 'firmware', 'bad-pages',
|
||||
'metric', 'process', 'profile', 'event', 'topology', 'set',
|
||||
'reset', 'monitor', 'xgmi', 'partition', 'ras', '--help', '-h']
|
||||
# Store possible subcommands & aliases for later errors
|
||||
valid_commands = amd_smi_parser.possible_commands
|
||||
valid_commands += ['--help', '-h']
|
||||
|
||||
sys.argv = [arg.lower() if arg.startswith('--') or not arg.startswith('-')
|
||||
else arg for arg in sys.argv]
|
||||
|
||||
Ссылка в новой задаче
Block a user