2
0
mirror of https://opendev.org/x/pyghmi synced 2025-12-02 15:01:53 +00:00

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
This commit is contained in:
Jarrod Johnson
2020-10-19 12:32:41 -04:00
parent 8265c9dbe7
commit 26e2ccdf89

View File

@@ -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'):