Skip to content

Commit

Permalink
Merge pull request #147 from DMTF/Sensor-Collecting-Hotfix
Browse files Browse the repository at this point in the history
Added missing check for presence of 'Sensors' when deciding which model to follow for collecting sensor info
  • Loading branch information
mraineri authored Apr 10, 2024
2 parents c390512 + 492bd24 commit 5818757
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redfish_utilities/sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"] )
Expand Down

0 comments on commit 5818757

Please sign in to comment.