2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-29 12:27:37 +00:00

Fix SMM account rule retrieval

This check was never updated for Py3

Change-Id: I9cf3ae2e1c366bb4f4ca75cfc69f651863a5f720
This commit is contained in:
Jarrod Johnson 2021-01-22 15:44:09 -05:00
parent 7f1852aa0a
commit a19f88faf8

View File

@ -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]]