From 584c1097634c3a66e194ff133f3bd074330c7247 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 20 Mar 2024 08:26:44 -0400 Subject: [PATCH] Fix handling of empty bays during cap manipulation Change-Id: Idb57183dca12e0e58f61469c185cba841f2eca08 --- pyghmi/ipmi/oem/lenovo/nextscale.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pyghmi/ipmi/oem/lenovo/nextscale.py b/pyghmi/ipmi/oem/lenovo/nextscale.py index de1524a1..e0487db3 100644 --- a/pyghmi/ipmi/oem/lenovo/nextscale.py +++ b/pyghmi/ipmi/oem/lenovo/nextscale.py @@ -527,8 +527,11 @@ class SMMClient(object): } for baynum in range(numbays): baynum += 1 - baycapinfo = self.ipmicmd.xraw_command( - 0x32, 0x9d, data=[baynum]) + try: + baycapinfo = self.ipmicmd.xraw_command( + 0x32, 0x9d, data=[baynum]) + except Exception: + continue capmin, capmax, protcap, usercap, thermcap = struct.unpack( '