mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #6156 (Error running Calibre on Xen virtual machine with Ubuntu Lucid 10.04)
This commit is contained in:
parent
97d3483a56
commit
6a4ff48059
@ -98,6 +98,9 @@ class LinuxScanner(object):
|
|||||||
|
|
||||||
def __call__(self):
|
def __call__(self):
|
||||||
ans = set([])
|
ans = set([])
|
||||||
|
if not self.ok:
|
||||||
|
raise RuntimeError('DeviceScanner requires the /sys filesystem to work.')
|
||||||
|
|
||||||
for x in os.listdir(self.base):
|
for x in os.listdir(self.base):
|
||||||
base = os.path.join(self.base, x)
|
base = os.path.join(self.base, x)
|
||||||
ven = os.path.join(base, 'idVendor')
|
ven = os.path.join(base, 'idVendor')
|
||||||
@ -145,8 +148,6 @@ class DeviceScanner(object):
|
|||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
if isosx and osx_scanner is None:
|
if isosx and osx_scanner is None:
|
||||||
raise RuntimeError('The Python extension usbobserver must be available on OS X.')
|
raise RuntimeError('The Python extension usbobserver must be available on OS X.')
|
||||||
if islinux and not linux_scanner.ok:
|
|
||||||
raise RuntimeError('DeviceScanner requires the /sys filesystem to work.')
|
|
||||||
self.scanner = win_scanner if iswindows else osx_scanner if isosx else linux_scanner
|
self.scanner = win_scanner if iswindows else osx_scanner if isosx else linux_scanner
|
||||||
self.devices = []
|
self.devices = []
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user