mirror of
https://github.com/brmlab/edubrm.git
synced 2025-06-09 05:14:01 +02:00
Merge branch 'master' of github.com:brmlab/edubrm
This commit is contained in:
commit
b9d7328f20
1 changed files with 4 additions and 1 deletions
|
@ -11,7 +11,10 @@ class Device:
|
||||||
usbdev = usb.core.find(idVendor = self.VENDORID, idProduct = self.PRODUCTID)
|
usbdev = usb.core.find(idVendor = self.VENDORID, idProduct = self.PRODUCTID)
|
||||||
if usbdev == None:
|
if usbdev == None:
|
||||||
raise Exception('EduBRM device not found')
|
raise Exception('EduBRM device not found')
|
||||||
|
try:
|
||||||
usbdev.detach_kernel_driver(0)
|
usbdev.detach_kernel_driver(0)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
usbdev.set_configuration()
|
usbdev.set_configuration()
|
||||||
self.epo = usb.util.find_descriptor(usbdev.get_interface_altsetting(),
|
self.epo = usb.util.find_descriptor(usbdev.get_interface_altsetting(),
|
||||||
custom_match = lambda e: \
|
custom_match = lambda e: \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue