From 8c6734b5e80ac7c3fa3813a17785a04aae979868 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 25 Jan 2022 08:05:50 -0500 Subject: [PATCH] Support newer SMMv2 firmware for PSU Change-Id: Id642758f45620db028074474f23cecf23de7a49c --- pyghmi/ipmi/oem/lenovo/nextscale.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyghmi/ipmi/oem/lenovo/nextscale.py b/pyghmi/ipmi/oem/lenovo/nextscale.py index 21d7b9fb..a84144cf 100644 --- a/pyghmi/ipmi/oem/lenovo/nextscale.py +++ b/pyghmi/ipmi/oem/lenovo/nextscale.py @@ -111,9 +111,9 @@ def fpc_get_psustatus(ipmicmd, number, sz): rsp = ipmicmd.xraw_command(netfn=0x32, command=0x91) mask = 1 << (number - 1) rsp['data'] = bytearray(rsp['data']) - if len(rsp['data']) == 10: + if len(rsp['data']) >= 10: tmpdata = rsp['data'] - rsp['data'] = list(struct.unpack('