From 17d1b79a579bd34b18249da1ea36e80c75020313 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 17 Apr 2020 13:14:46 -0400 Subject: [PATCH] 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 --- pyghmi/ipmi/oem/lenovo/energy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/energy.py b/pyghmi/ipmi/oem/lenovo/energy.py index 72eb6fe4..dc169723 100644 --- a/pyghmi/ipmi/oem/lenovo/energy.py +++ b/pyghmi/ipmi/oem/lenovo/energy.py @@ -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: