mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-16 09:14:27 +01:00
Fix #6156 (Error running Calibre on Xen virtual machine with Ubuntu Lucid 10.04)
This commit is contained in:
parent
97d3483a56
commit
6a4ff48059
1 changed files with 3 additions and 2 deletions
|
|
@ -98,6 +98,9 @@ def __init__(self):
|
|||
|
||||
def __call__(self):
|
||||
ans = set([])
|
||||
if not self.ok:
|
||||
raise RuntimeError('DeviceScanner requires the /sys filesystem to work.')
|
||||
|
||||
for x in os.listdir(self.base):
|
||||
base = os.path.join(self.base, x)
|
||||
ven = os.path.join(base, 'idVendor')
|
||||
|
|
@ -145,8 +148,6 @@ class DeviceScanner(object):
|
|||
def __init__(self, *args):
|
||||
if isosx and osx_scanner is None:
|
||||
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.devices = []
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue