Esempio n. 1
0
 def kernelDriverActive(self, interface):
     result = libusb1.libusb_kernel_driver_active(self.handle, interface)
     if result == 0:
         is_active = False
     elif result == 1:
         is_active = True
     else:
         raise libusb1.USBError, result
     return is_active
Esempio n. 2
0
 def kernelDriverActive(self, interface):
     """
     Tell whether a kernel driver is active on given interface number.
     """
     result = libusb1.libusb_kernel_driver_active(self.__handle, interface)
     if result == 0:
         is_active = False
     elif result == 1:
         is_active = True
     else:
         raise libusb1.USBError(result)
     return is_active