On 28 November 2011 22:32, Wander Lairson Costa <wander.lair...@gmail.com> wrote: > 2011/11/28 Robert von Burg <ei...@eitchnet.ch>: >> Hi guys >> >> Device.is_kernel_driver_active(Interface) >> >> I get the following stack trace: >> >> intf: <usb.core.Interface object at 0x213d750> >> Traceback (most recent call last): >> File "./usbTest3.py", line 32, in <module> >> kernelDriverActive = dev.is_kernel_driver_active(intf) >> File "/usr/local/lib/python2.6/dist-packages/usb/core.py", line 704, >> in is_kernel_driver_active >> return self._ctx.backend.is_kernel_driver_active(self._ctx.handle, >> interface) >> File "/usr/local/lib/python2.6/dist-packages/usb/backend/libusb10.py", >> line 609, in is_kernel_driver_active >> return bool(_check(_lib.libusb_kernel_driver_active(dev_handle, intf))) >> ctypes.ArgumentError: argument 2: <type 'exceptions.TypeError'>: wrong type >> >> Can this again be a problem with me using Python 2.6.6 >> > > This affects all Python versions. What happens is that kernel drivers > functions expect an interface number, not an Interface object, which > is confusing, since other functions can deal both with interface > numbers and Interface object. Anyway, I just pushed a fix to the > master branch, your code should work now. Thank you for the report.
Thanks, I just tested it, and it works. Thank you for the really quick response! kind regards -- Robert von Burg <ei...@eitchnet.ch> dipl. Informatiker in Softwareentwicklung HF / pBac-Eng ODEC software development system & network administration http://eitchnet.ch http://gsinet.ch ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users