2011/11/28 Robert von Burg <ei...@eitchnet.ch>:
> Hi guys
>
> Playing around a bit more, i have a weird exception, which, with my
> basic python knowledge, is a language problem, and now a usb problem
> when i call
>
> 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.

-- 
Best Regards,
Wander Lairson Costa
https://github.com/walac
https://gitorious.org/~walac

------------------------------------------------------------------------------
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

Reply via email to