From b059e839ac9da07986584213ae09d885252d96d5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 17 Oct 2013 13:02:47 +0530 Subject: [PATCH] Fix typos in linux_swap_drives() in a few other devices --- src/calibre/devices/eb600/driver.py | 2 +- src/calibre/devices/hanlin/driver.py | 2 +- src/calibre/devices/misc.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/devices/eb600/driver.py b/src/calibre/devices/eb600/driver.py index 0e19363c60..12812f3b9a 100644 --- a/src/calibre/devices/eb600/driver.py +++ b/src/calibre/devices/eb600/driver.py @@ -62,7 +62,7 @@ class TOLINO(EB600): # There are apparently two versions of this device, one with swapped # drives and one without, see https://bugs.launchpad.net/bugs/1240504 def linux_swap_drives(self, drives): - if len(drives) < 2 or not drives[1] or not drives[2]: + if len(drives) < 2 or not drives[0] or not drives[1]: return drives drives = list(drives) t = drives[0] diff --git a/src/calibre/devices/hanlin/driver.py b/src/calibre/devices/hanlin/driver.py index 513e083c6c..6ec93745c7 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 or not drives[1] or not drives[2]: return drives + if len(drives) < 2 or not drives[0] or not drives[1]: return drives drives = list(drives) t = drives[0] drives[0] = drives[1] diff --git a/src/calibre/devices/misc.py b/src/calibre/devices/misc.py index f6d10ef1cf..43157480b9 100644 --- a/src/calibre/devices/misc.py +++ b/src/calibre/devices/misc.py @@ -461,7 +461,7 @@ class WAYTEQ(USBMS): def linux_swap_drives(self, drives): # See https://bugs.launchpad.net/bugs/1151901 - if len(drives) < 2 or not drives[1] or not drives[2]: + if len(drives) < 2 or not drives[0] or not drives[1]: return drives drives = list(drives) t = drives[0]