detachKernelDriver will fail if you have no enough permissions, won't it?

2009/1/2 Jim Easterbrook <[email protected]>:
> Karl Ostmo wrote:
>> I use this approach in my code:
>>
>>         try:
>>             self.handle.claimInterface( 0 )
>>         except usb.USBError, e:
>>             if e.message.find("could not claim interface") >= 0:
>>                 self.handle.detachKernelDriver( 0 )
>>                 self.handle.claimInterface( 0 )
>
> I'm the author of the weather station software David is trying to use. I
> call detachKernelDriver before calling claimInterface anyway, so I don't
> think this is David's problem.
>
> Is there an advantage in not calling detachKernelDriver unless
> claimInterface has failed?
>
> --
> Jim Easterbrook                 <http://www.jim-easterbrook.me.uk/>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Pyusb-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>

------------------------------------------------------------------------------
_______________________________________________
Pyusb-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to