From fb75c224f22ddbf66112df1ab08565eb4868aca8 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 13 Jul 2026 08:56:43 -0400 Subject: [PATCH] Enhance SEL handling Change-Id: If4c48291d2a2507617be1ef5d18703a315c9c884 --- pyghmi/ipmi/events.py | 19 ++++++++++++++++--- pyghmi/ipmi/oem/generic.py | 4 +++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/pyghmi/ipmi/events.py b/pyghmi/ipmi/events.py index e2c7df1c..7e57f57b 100644 --- a/pyghmi/ipmi/events.py +++ b/pyghmi/ipmi/events.py @@ -516,15 +516,28 @@ class EventHandler(object): selentry = bytearray(origselentry) event = {} event['record_id'] = struct.unpack_from('= 7: # Either standard, or at least the timestamp is standard event['timecode'] = struct.unpack_from('= 0xe0: # In this class of OEM message, all bytes are OEM, interpretation # is wholly left up to the OEM layer, using the OEM ID of the BMC diff --git a/pyghmi/ipmi/oem/generic.py b/pyghmi/ipmi/oem/generic.py index 007fdb3e..16a04cef 100644 --- a/pyghmi/ipmi/oem/generic.py +++ b/pyghmi/ipmi/oem/generic.py @@ -140,7 +140,9 @@ class OEMHandler(object): to apply some transform to some field to suit their conventions. """ event['oem_handler'] = None - evdata = event['event_data_bytes'] + evdata = event.get('event_data_bytes') + if not evdata: + return if evdata[0] & 0b11000000 == 0b10000000: event['oem_byte2'] = evdata[1] if evdata[0] & 0b110000 == 0b100000: