From f61ffcac0442e855b0ffc36a6633641be5f0837c Mon Sep 17 00:00:00 2001 From: luyf5 Date: Wed, 1 Sep 2021 17:00:12 +0800 Subject: [PATCH] check the fruinf again as the oem process may return None the change is from https://gitlab.icelab.lenovo.com/pygcon/pyghmi/commit/d09e23fea99664859bf00f3eae80d8720992d68c#dade58c051d057633b161944993db070adc93aa0 collection of M4 and Kent support - 12032015 Change-Id: I2546634397ebf705d125be5ff88024533a3196ba --- pyghmi/ipmi/command.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyghmi/ipmi/command.py b/pyghmi/ipmi/command.py index c44b4535..b42b1c86 100644 --- a/pyghmi/ipmi/command.py +++ b/pyghmi/ipmi/command.py @@ -690,7 +690,9 @@ class Command(object): if fruinf is not None: fruinf = self._oem.process_fru(fruinf, self._sdr.fru[fruid].fru_name) - yield (self._sdr.fru[fruid].fru_name, fruinf) + # check the fruinf again as the oem process may return None + if fruinf: + yield (self._sdr.fru[fruid].fru_name, fruinf) for componentpair in self._oem.get_oem_inventory(): yield componentpair