diff --git a/pyghmi/ipmi/oem/lenovo/config.py b/pyghmi/ipmi/oem/lenovo/config.py index 9033e484..9e29c176 100644 --- a/pyghmi/ipmi/oem/lenovo/config.py +++ b/pyghmi/ipmi/oem/lenovo/config.py @@ -55,10 +55,10 @@ class LenovoFirmwareConfig(object): for i in range(len(filename)): data += [ord(filename[i])] - response = self.connection.raw_command(netfn=IMM_NETFN, - command=IMM_COMMAND, data=data) + response = self.connection.xraw_command(netfn=IMM_NETFN, + command=IMM_COMMAND, data=data) - size = ''.join(chr(c) for c in response['data'][3:7]) + size = response['data'][3:7] size = struct.unpack("i", size) return size[0] @@ -84,9 +84,9 @@ class LenovoFirmwareConfig(object): while retries: retries = retries-1 - response = self.connection.raw_command(netfn=IMM_NETFN, - command=IMM_COMMAND, - data=data) + response = self.connection.xraw_command(netfn=IMM_NETFN, + command=IMM_COMMAND, + data=data) try: if response['code'] == 0 or retries == 0: break @@ -94,7 +94,7 @@ class LenovoFirmwareConfig(object): pass self.connection.ipmi_session.pause(5) - filehandle = ''.join(chr(byte) for byte in response['data'][3:7]) + filehandle = response['data'][3:7] filehandle = struct.unpack("