commit 26e2ccdf8922af176f471a175d49313e4fc7875a Author: Jarrod Johnson Date: Mon Oct 19 12:32:41 2020 -0400 Fix problem with older IBM equipment and python3 Older IBM system path still used a python2-only operation. Address with a python 2/3 agnostic approach. Change-Id: I33df26a0b2311682642660a5e0893201b547fb03 diff --git a/pyghmi/ipmi/oem/lenovo/energy.py b/pyghmi/ipmi/oem/lenovo/energy.py index dc16972..15c1b60 100644 --- a/pyghmi/ipmi/oem/lenovo/energy.py +++ b/pyghmi/ipmi/oem/lenovo/energy.py @@ -32,7 +32,7 @@ class EnergyManager(object): if ie.ipmicode == 193: # try again with IBM IANA self.iana = bytearray(b'\x4d\x4f\x00') rsp = ipmicmd.xraw_command(netfn=0x2e, command=0x82, - data=self.iana + '\x00\x00\x01') + data=self.iana + b'\x00\x00\x01') else: raise if rsp['data'][4:6] not in (b'\x02\x01', b'\x02\x06', b'\x02\x09'):