From 1c176423d9049cfde166b0057dd7f2067781bd23 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 6 May 2011 13:20:31 -0600 Subject: [PATCH] Hanlin driver: Do not swap drives on linux if there is only one detected drive --- src/calibre/devices/hanlin/driver.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/calibre/devices/hanlin/driver.py b/src/calibre/devices/hanlin/driver.py index ba0cca954d..2234e2112c 100644 --- a/src/calibre/devices/hanlin/driver.py +++ b/src/calibre/devices/hanlin/driver.py @@ -64,7 +64,7 @@ class HANLINV3(USBMS): return names def linux_swap_drives(self, drives): - if len(drives) < 2: return drives + if len(drives) < 2 or not drives[1] or not drives[2]: return drives drives = list(drives) t = drives[0] drives[0] = drives[1] @@ -95,7 +95,6 @@ class HANLINV5(HANLINV3): gui_name = 'Hanlin V5' description = _('Communicate with Hanlin V5 eBook readers.') - VENDOR_ID = [0x0492] PRODUCT_ID = [0x8813] BCD = [0x319]