hid_set_feature_report excepts integers instead longints

Bug #388042 reported by djamps
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libhid (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: python-hid

Ubuntu 9.04, Python 2.6.2,

hid.hid_set_feature_report function should accept sequence of longints in path parameter but it excepts integers. I guess something is wrong with libhid python interface bindings?

Example code below, for testing change matcher.vendor_id and matcher.product_id to some device displayed in your lsusb listing.
---
#!/usr/bin/env python
import hid
def main():
        matcher = hid.HIDInterfaceMatcher()
        matcher.vendor_id = 0x1234
        matcher.product_id = 0x0001
        iface = hid.hid_new_HIDInterface()
        hid.hid_open(iface, 0, matcher)
        path = [0xffa00001,0xffa00004]
        bytes = '\0x01'
        hid.hid_set_feature_report(iface, path, bytes)

if __name__ == '__main__':
    main()
---
causes error:
root@foo:~$ python test.py
Traceback (most recent call last):
  File "test.py", line 14, in <module>
    main()
  File "test.py", line 11, in main
    hid.hid_set_feature_report(iface, path, bytes)
  File "/var/lib/python-support/python2.6/hid/__init__.py", line 214, in hid_set_feature_report
    return _hid.hid_set_feature_report(*args)
ValueError: Expecting a sequence of integers

djamps (dajamppa)
description: updated
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.