2
0
mirror of https://opendev.org/x/pyghmi synced 2026-05-18 04:07:19 +00:00

Merge "Support newer SMMv2 firmware for PSU"

This commit is contained in:
Zuul
2022-01-25 14:27:14 +00:00
committed by Gerrit Code Review
+2 -2
View File
@@ -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('<HHHHBB', tmpdata))
rsp['data'] = list(struct.unpack('<HHHHBB', tmpdata[:10]))
if len(rsp['data']) == 6:
statdata = [0]
else: