diff --git a/pyghmi/ipmi/oem/lenovo/config.py b/pyghmi/ipmi/oem/lenovo/config.py index a57200b9..89ff5395 100644 --- a/pyghmi/ipmi/oem/lenovo/config.py +++ b/pyghmi/ipmi/oem/lenovo/config.py @@ -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"): diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index 861bee9b..246818e7 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -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: