Skip to content

Commit fabef32

Browse files
committed
Can be useful to know if pyusb is not able to find any backend
1 parent c894a21 commit fabef32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jackit/lib/nrf24.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def __init__(self, index=0):
6969
try:
7070
self.dongle = list(usb.core.find(idVendor=0x1915, idProduct=0x0102, find_all=True))[index]
7171
self.dongle.set_configuration()
72-
except usb.core.USBError as ex:
72+
except (usb.core.NoBackendError, usb.core.USBError) as ex:
7373
raise ex
7474
except:
7575
raise Exception('Cannot find USB dongle.')

0 commit comments

Comments
 (0)