Fixed handling in GPU/CPU/CORE select functions
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com> Change-Id: I83d78a8d6cdcbd54e5c79330be577b3a06a00985
This commit is contained in:
@@ -331,7 +331,7 @@ class AMDSMIHelpers():
|
||||
(False, valid_gpu_format, str): Return False, whether the format of the GPU input is valid, and the first input that failed to be converted
|
||||
"""
|
||||
if 'all' in gpu_selections:
|
||||
return (True, amdsmi_interface.amdsmi_get_processor_handles())
|
||||
return True, True, amdsmi_interface.amdsmi_get_processor_handles()
|
||||
|
||||
if isinstance(gpu_selections, str):
|
||||
gpu_selections = [gpu_selections]
|
||||
@@ -387,7 +387,7 @@ class AMDSMIHelpers():
|
||||
(False, str): Return False, and the first input that failed to be converted
|
||||
"""
|
||||
if 'all' in cpu_selections:
|
||||
return (True, amdsmi_interface.amdsmi_get_cpusocket_handles())
|
||||
return True, True, amdsmi_interface.amdsmi_get_cpusocket_handles()
|
||||
|
||||
if isinstance(cpu_selections, str):
|
||||
cpu_selections = [cpu_selections]
|
||||
@@ -428,7 +428,7 @@ class AMDSMIHelpers():
|
||||
(False, str): Return False, and the first input that failed to be converted
|
||||
"""
|
||||
if 'all' in core_selections:
|
||||
return (True, amdsmi_interface.amdsmi_get_cpucore_handles())
|
||||
return True, True, amdsmi_interface.amdsmi_get_cpucore_handles()
|
||||
|
||||
if isinstance(core_selections, str):
|
||||
core_selections = [core_selections]
|
||||
|
||||
@@ -171,6 +171,7 @@ class AMDSMIParser(argparse.ArgumentParser):
|
||||
else:
|
||||
raise amdsmi_cli_exceptions.AmdSmiInvalidParameterValueException(string_value, outputformat)
|
||||
|
||||
|
||||
def _check_output_file_path(self):
|
||||
""" Argument action validator:
|
||||
Returns a path to a file from the output file path provided.
|
||||
|
||||
Reference in New Issue
Block a user