Skip to content

Commit

Permalink
Fixed 'list' commands for 'rf_power_equipment.py' and 'rf_thermal_equ…
Browse files Browse the repository at this point in the history
…ipment.py' to handle cases where properties are not supported or null

Signed-off-by: Mike Raineri <[email protected]>
  • Loading branch information
mraineri committed Jul 11, 2024
1 parent ee8863d commit 8cd9ee4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions redfish_utilities/power_equipment.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,11 @@ def print_power_equipment_summary(power_equipment_summary):
for equipment in power_equipment_summary[equipment_type]:
print(
summary_line_format.format(
equipment["Id"],
equipment["Model"],
equipment["SerialNumber"],
equipment["State"],
equipment["Health"],
equipment["Id"] if equipment["Id"] else "",
equipment["Model"] if equipment["Model"] else "",
equipment["SerialNumber"] if equipment["SerialNumber"] else "",
equipment["State"] if equipment["State"] else "",
equipment["Health"] if equipment["Health"] else "",
)
)
print("")
Expand Down
10 changes: 5 additions & 5 deletions redfish_utilities/thermal_equipment.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,11 @@ def print_thermal_equipment_summary(thermal_equipment_summary):
for equipment in thermal_equipment_summary[equipment_type]:
print(
summary_line_format.format(
equipment["Id"],
equipment["Model"],
equipment["SerialNumber"],
equipment["State"],
equipment["Health"],
equipment["Id"] if equipment["Id"] else "",
equipment["Model"] if equipment["Model"] else "",
equipment["SerialNumber"] if equipment["SerialNumber"] else "",
equipment["State"] if equipment["State"] else "",
equipment["Health"] if equipment["Health"] else "",
)
)
print("")
Expand Down

0 comments on commit 8cd9ee4

Please sign in to comment.