mirror of
https://opendev.org/x/pyghmi
synced 2025-11-02 12:22:27 +00:00
Provide better error handling for XCC/IMM
The UEFI configuration can fail out. Change-Id: I0e6fc5630f6bb9df02512b8d3a3818e5f1d283a0
This commit is contained in:
@@ -268,7 +268,8 @@ class LenovoFirmwareConfig(object):
|
||||
if len(data) != 0:
|
||||
break
|
||||
self.connection.ipmi_session.pause(2)
|
||||
|
||||
if not data:
|
||||
raise Exception("BMC failed to return configuration information")
|
||||
xml = etree.fromstring(data)
|
||||
sortid = 0
|
||||
for config in xml.iter("config"):
|
||||
|
||||
@@ -171,7 +171,10 @@ class IMMClient(object):
|
||||
def get_system_configuration(self, hideadvanced=True):
|
||||
if not self.fwc:
|
||||
self.fwc = config.LenovoFirmwareConfig(self.ipmicmd)
|
||||
self.fwo = self.fwc.get_fw_options()
|
||||
try:
|
||||
self.fwo = self.fwc.get_fw_options()
|
||||
except Exception:
|
||||
raise Exception(self.bmcname + ' failed to retrieve UEFI configuration')
|
||||
self.fwovintage = util._monotonic_time()
|
||||
retcfg = {}
|
||||
for opt in self.fwo:
|
||||
|
||||
Reference in New Issue
Block a user