2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-12 18:58:34 +00:00

No longer consider unrecognized states as 'warning'

The precedent seems to be to ignore unknown states, so
follow that.

Change-Id: Ibafc28a1695276455401334aeca8e4f0dc65446b
This commit is contained in:
Jarrod Johnson 2024-02-27 11:20:38 -05:00
parent da7796b518
commit cbe0896f00

View File

@ -469,11 +469,11 @@ class SDREntry(object):
health = sensedata['severity']
else:
desc = "Unknown state %d" % state
health = const.Health.Warning
health = const.Health.Ok
except KeyError:
desc = "Unknown state %d for reading type %d/sensor type %d" % (
state, self.reading_type, self.sensor_type_number)
health = const.Health.Warning
health = const.Health.Ok
return desc, health
def decode_sensor_reading(self, ipmicmd, reading):