From 5b7bd84895d030ea06417640ebe25d81754bbb36 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 30 Jun 2015 10:38:00 -0400 Subject: [PATCH] Fix PET acknowledge errors The PET acknowledge code was incorrect. Fix it by properly extracting the fields by index and fixing reference to self._ipmicmd and also do not treat a failure on acknowledge as an error for now. Change-Id: Icafc21807a59e53acf3249170450bf4dbeee9e5d --- pyghmi/ipmi/events.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pyghmi/ipmi/events.py b/pyghmi/ipmi/events.py index 313043fd..c4f7fb9f 100644 --- a/pyghmi/ipmi/events.py +++ b/pyghmi/ipmi/events.py @@ -447,12 +447,15 @@ class EventHandler(object): sensorid = petdata[28] event_data = petdata[31:34] event = {} - seqnum = struct.unpack_from('>H', buffer(petdata[16:18])) - ltimestamp = struct.unpack_from('>I', buffer(petdata[18:22])) + seqnum = struct.unpack_from('>H', buffer(petdata[16:18]))[0] + ltimestamp = struct.unpack_from('>I', buffer(petdata[18:22]))[0] petack = bytearray(struct.pack('