From 492bd24b477f8dab54b25c9cd0b5751fda6633d6 Mon Sep 17 00:00:00 2001 From: Mike Raineri Date: Wed, 10 Apr 2024 14:34:14 -0400 Subject: [PATCH] Added missing check for presence of 'Sensors' when deciding which model to follow for collecting sensor info Signed-off-by: Mike Raineri --- redfish_utilities/sensors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redfish_utilities/sensors.py b/redfish_utilities/sensors.py index e757ef1..6242861 100644 --- a/redfish_utilities/sensors.py +++ b/redfish_utilities/sensors.py @@ -50,7 +50,7 @@ def get_sensors( context , use_id = False ): get_discrete_status( "State", chassis.dict, chassis_instance["Readings"] ) # If the chassis contains any of the newer power/thermal models, scan based on the common sensor model - if "EnvironmentMetrics" in chassis.dict or "PowerSubsystem" in chassis.dict or "ThermalSubsystem" in chassis.dict: + if "EnvironmentMetrics" in chassis.dict or "PowerSubsystem" in chassis.dict or "ThermalSubsystem" in chassis.dict or "Sensors" in chassis.dict: # Get readings from the EnvironmentMetrics resource if available if "EnvironmentMetrics" in chassis.dict: environment = context.get( chassis.dict["EnvironmentMetrics"]["@odata.id"] )