Using local BMC fails to get sensor data

Bug #1826261 reported by Bryan Seitz
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pyghmi
New
Undecided
Unassigned

Bug Description

Pyghmi version: 1.3.0
Python version: 2.7.15

Calling get_sensor_data and iterating over the response on a bmc=None command session yields:

---
sensor_data = ipmi.get_sensor_data()
for x in sensor_data:
    print x
---

pyghmi/pyghmi-cpython-27/pyghmi/ipmi/command.py", line 446, in xraw_command
    rsp['data'] = buffer(rsp['data'])
TypeError: buffer object expected

The rsp['data'] object is a list when using the local bmc interface instead of OOB.

If you cast this to bytearray before calling buffer, it works as expected.
rsp['data'] = buffer(bytearray(rsp['data']))

Also seems to work on OOB session as well, but not sure how you'd want to fix this and other differences that might exist as well.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.