Fix python3 compatibility with older IBM

Older IBM tripped over a problem in energy manager
due to a bytes value not prepended with b.

Change-Id: I81cb68805ddaf5c4ae79eafb08fa4c27672945f2
This commit is contained in:
Jarrod Johnson 2020-04-17 13:14:46 -04:00
parent 2165dfde72
commit 17d1b79a57

View File

@ -30,7 +30,7 @@ class EnergyManager(object):
data=self.iana + b'\x00\x00\x01')
except pygexc.IpmiException as ie:
if ie.ipmicode == 193: # try again with IBM IANA
self.iana = bytearray('\x4d\x4f\x00')
self.iana = bytearray(b'\x4d\x4f\x00')
rsp = ipmicmd.xraw_command(netfn=0x2e, command=0x82,
data=self.iana + '\x00\x00\x01')
else: