From a19f88faf86fbb85b7457a12644a217646c8943c Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 22 Jan 2021 15:44:09 -0500 Subject: [PATCH] Fix SMM account rule retrieval This check was never updated for Py3 Change-Id: I9cf3ae2e1c366bb4f4ca75cfc69f651863a5f720 --- pyghmi/ipmi/oem/lenovo/nextscale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/nextscale.py b/pyghmi/ipmi/oem/lenovo/nextscale.py index 020e24ec..bd37fa22 100644 --- a/pyghmi/ipmi/oem/lenovo/nextscale.py +++ b/pyghmi/ipmi/oem/lenovo/nextscale.py @@ -337,7 +337,7 @@ class SMMClient(object): accountinfo = fromstring(rspbody) for rule in self.rulemap: ruleinfo = accountinfo.find(self.rulemap[rule]) - if ruleinfo: + if ruleinfo is not None: settings[rule] = {'value': int(ruleinfo.text)} rsp = self.ipmicmd.xraw_command(0x34, 3) fanmode = self.fanmodes[bytearray(rsp['data'])[0]]