From c25046b23f0ca2be5ebd9eeb9336801537430e46 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 15 May 2018 10:27:44 -0400 Subject: [PATCH] Handle missing properties Missing properties happen on older firmware, return blank info. Change-Id: I1972ab95a15ebe86180462158d3ea78a2c3b4a1b --- pyghmi/ipmi/oem/lenovo/imm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index beca24c1..d99d7227 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -46,6 +46,8 @@ def fixup_uuid(uuidprop): def fixup_str(propstr): + if propstr is None: + return '' return ''.join([chr(int(c, 16)) for c in propstr.split()]).strip( ' \xff\x00')