mirror of
https://opendev.org/x/pyghmi
synced 2025-01-15 12:17:44 +00:00
For unspecified sensors use None as the component
Rather than use the string 'Unspecified', use the None object to denote an event that has no associated component. Change-Id: I8b8431257a01434ec09aaa940fab5bbce2164ae6
This commit is contained in:
parent
612c3fb303
commit
369463eb9f
@ -382,7 +382,7 @@ class EventHandler(object):
|
||||
event['component'] = self._sdr.sensors[eventdata[4]].name
|
||||
except KeyError:
|
||||
if eventdata[4] == 0:
|
||||
event['component'] = 'Unspecified'
|
||||
event['component'] = None
|
||||
else:
|
||||
event['component'] = 'Sensor {0}'.format(eventdata[4])
|
||||
event['deassertion'] = (eventdata[5] & 0b10000000 == 0b10000000)
|
||||
|
Loading…
x
Reference in New Issue
Block a user