From ebc14611dfe6412bac17bab55aa971c92cb36e46 Mon Sep 17 00:00:00 2001 From: Sliim Date: Tue, 22 Aug 2017 19:28:05 +0200 Subject: [PATCH] Can be useful to know if pyusb is not able to find any backend --- jackit/lib/nrf24.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jackit/lib/nrf24.py b/jackit/lib/nrf24.py index 3a1c2b7..0ed7965 100644 --- a/jackit/lib/nrf24.py +++ b/jackit/lib/nrf24.py @@ -69,7 +69,7 @@ def __init__(self, index=0): try: self.dongle = list(usb.core.find(idVendor=0x1915, idProduct=0x0102, find_all=True))[index] self.dongle.set_configuration() - except usb.core.USBError as ex: + except (usb.core.NoBackendError, usb.core.USBError) as ex: raise ex except: raise Exception('Cannot find USB dongle.')