2
0
mirror of https://opendev.org/x/pyghmi synced 2025-08-30 23:08:07 +00:00

fix(kcs): Fix the command class to use bytearray instead of lists for raw data

Change-Id: I55ef076827447d3e0b8bbbd9d9dd8d0006804232
This commit is contained in:
Connor Reed
2020-02-25 11:20:46 -05:00
parent 3221bb1ed3
commit ba699294ca
2 changed files with 2 additions and 4 deletions

View File

@@ -495,8 +495,6 @@ class Command(object):
bridge_request=bridge_request,
data=data, delay_xmit=delay_xmit,
retry=retry, timeout=timeout)
if 'data' in rsp:
rsp['data'] = list(rsp['data'])
return rsp
def get_power(self):

View File

@@ -98,8 +98,8 @@ class Session(object):
def parsed_rsp(self):
response = {'netfn': self.rsp.msg.netfn, 'command': self.rsp.msg.cmd,
'code': bytearray(self.databuffer.raw)[0],
'data': list(bytearray(
self.databuffer.raw[1:self.rsp.msg.data_len]))}
'data': bytearray(
self.databuffer.raw[1:self.rsp.msg.data_len])}
errorstr = iutil.get_ipmi_error(response)
if errorstr:
response['error'] = errorstr