Sensor names don't have ending null bytes trimmed
Bug #1672181 reported by
lf
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyghmi |
New
|
Undecided
|
Unassigned |
Bug Description
get_sensor_data() on a Command instance doesn't correctly trim null bytes on the name field:
In [11]: list(c.
Out[11]:
{'states': ['Present'], 'health': 0, 'name': 'VRM 1\x00\x00\
Expected behaviour:
In [11]: list(c.
Out[11]:
{'states': ['Present'], 'health': 0, 'name': 'VRM 1', 'imprecision': None, 'units': '', 'state_ids': [591873], 'type': 'Power Unit', 'value': None, 'unavailable': 0}
Environment details:
HP iLO 2, pyghmi (1.0.18)
To post a comment you must log in.
This is a semi-non-bug because the names appear to actually *be* the names padded to 16 chars with null bytes. So if you need to get a sensor with get_sensor_reading, you need the null bytes.