mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Find devices should return an empty list when libusb is not available.
This commit is contained in:
parent
5ad276ba7f
commit
5a318e112f
@ -145,6 +145,8 @@ class Bus(Structure):
|
|||||||
TODO: Check if exploring children is neccessary (e.g. with an external hub)
|
TODO: Check if exploring children is neccessary (e.g. with an external hub)
|
||||||
"""
|
"""
|
||||||
def fget(self):
|
def fget(self):
|
||||||
|
if _libusb is None:
|
||||||
|
return []
|
||||||
if _libusb.usb_find_devices() < 0:
|
if _libusb.usb_find_devices() < 0:
|
||||||
raise Error('Unable to search for USB devices')
|
raise Error('Unable to search for USB devices')
|
||||||
ndev = self.devices
|
ndev = self.devices
|
||||||
|
Loading…
x
Reference in New Issue
Block a user