[SWDEV-540665] Fix power_caps in help text (#642)

Signed-off-by: adapryor <Adam.pryor@amd.com>
This commit is contained in:
Pryor, Adam
2025-08-21 16:45:37 -05:00
committed by GitHub
parent 074c4b7a3f
commit 4ac1c7e453
2 changed files with 10 additions and 2 deletions
+7 -1
View File
@@ -821,8 +821,14 @@ class AMDSMIHelpers():
power_cap_min = power_cap_info['min_power_cap']
except amdsmi_interface.AmdSmiLibraryException as e:
logging.debug(f"AMDSMIHelpers.get_power_caps - Unable to get power cap info for device {dev}: {str(e)}")
power_cap_min, power_cap_max = "N/A", "N/A"
continue
# If we never found a real min or max, set them to N/A
if power_cap_min == amdsmi_interface.MaxUIntegerTypes.UINT64_T:
power_cap_min = "N/A"
if power_cap_max == 0:
power_cap_max = "N/A"
return (power_cap_min, power_cap_max)