diff --git a/pyghmi/ipmi/command.py b/pyghmi/ipmi/command.py index 464dd936..e71a41f9 100644 --- a/pyghmi/ipmi/command.py +++ b/pyghmi/ipmi/command.py @@ -706,16 +706,15 @@ class Command(object): fallbackreadings = [] try: self.oem_init() - self._oem.get_health(summary) + fallbackreadings = self._oem.get_health(summary) for reading in self.get_sensor_data(): if reading.health != const.Health.Ok: summary['health'] |= reading.health summary['badreadings'].append(reading) except exc.BypassGenericBehavior: pass - except exc.FallbackData as fd: - if not summary['badreadings']: - summary['badreadings'] = fd.fallbackdata + if not summary['badreadings']: + summary['badreadings'] = fallbackreadings return summary def get_sensor_reading(self, sensorname): diff --git a/pyghmi/ipmi/oem/generic.py b/pyghmi/ipmi/oem/generic.py index 43f7e7d5..827d2969 100644 --- a/pyghmi/ipmi/oem/generic.py +++ b/pyghmi/ipmi/oem/generic.py @@ -302,7 +302,7 @@ class OEMHandler(object): :param summary: The health summary as prepared by the generic function :return: Nothing, modifies the summary object """ - return + return [] def set_hostname(self, hostname): """OEM specific hook to specify name information diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index 1a23c6e2..0b553a59 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -1733,7 +1733,7 @@ class XCCClient(IMMClient): 'health': pygconst.Health.Warning, 'type': 'LED', }, '')) - raise pygexc.FallbackData(fallbackdata) + return fallbackdata # Will use the generic handling for unhealthy systems def get_licenses(self):