version 0.5.10

This commit is contained in:
Kovid Goyal 2009-05-01 15:27:07 -07:00
parent cc8277bed9
commit bf973de56f
4 changed files with 17 additions and 13 deletions

View File

@ -2,7 +2,7 @@ __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
__docformat__ = 'restructuredtext en' __docformat__ = 'restructuredtext en'
__appname__ = 'calibre' __appname__ = 'calibre'
__version__ = '0.5.9' __version__ = '0.5.10'
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>" __author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
''' '''
Various run time constants. Various run time constants.

View File

@ -2,6 +2,13 @@ __license__ = 'GPL v3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
''' '''
Device driver for the Netronix EB600 Device driver for the Netronix EB600
Windows PNP strings:
('USBSTOR\\DISK&VEN_NETRONIX&PROD_EBOOK&REV_062E\\6&1A275569&0&EB6001009
2W00000&0', 2, u'F:\\')
('USBSTOR\\DISK&VEN_NETRONIX&PROD_EBOOK&REV_062E\\6&1A275569&0&EB6001009
2W00000&1', 3, u'G:\\')
''' '''
from calibre.devices.usbms.driver import USBMS from calibre.devices.usbms.driver import USBMS
@ -30,8 +37,8 @@ class EB600(USBMS):
SUPPORTS_SUB_DIRS = True SUPPORTS_SUB_DIRS = True
def windows_sort_drives(self, drives): def windows_sort_drives(self, drives):
main = drives['main'] main = drives.get('main', None)
card = drives['card'] card = drives.get('card', None)
if card and main and card < main: if card and main and card < main:
drives['main'] = card drives['main'] = card
drives['card'] = main drives['card'] = main

View File

@ -23,9 +23,6 @@ class JETBOOK(USBMS):
WINDOWS_MAIN_MEM = 'EBOOK' WINDOWS_MAIN_MEM = 'EBOOK'
WINDOWS_CARD_MEM = 'EBOOK' WINDOWS_CARD_MEM = 'EBOOK'
WINDOWS_MAIN_MEM = None
WINDOWS_CARD_MEM = None
OSX_MAIN_MEM = None OSX_MAIN_MEM = None
OSX_CARD_MEM = None OSX_CARD_MEM = None
@ -110,8 +107,8 @@ class JETBOOK(USBMS):
return mi return mi
def windows_sort_drives(self, drives): def windows_sort_drives(self, drives):
main = drives['main'] main = drives.get('main', None)
card = drives['card'] card = drives.get('card', None)
if card and main and card < main: if card and main and card < main:
drives['main'] = card drives['main'] = card
drives['card'] = main drives['card'] = main

View File

@ -196,15 +196,15 @@ class Device(_Device):
if 'main' in drives.keys() and 'card' in drives.keys(): if 'main' in drives.keys() and 'card' in drives.keys():
break break
drives = self.windows_sort_drives(drives) if 'main' not in drives:
self._main_prefix = drives.get('main')
self._card_prefix = drives.get('card')
if not self._main_prefix:
raise DeviceError( raise DeviceError(
_('Unable to detect the %s disk drive. Try rebooting.') % _('Unable to detect the %s disk drive. Try rebooting.') %
self.__class__.__name__) self.__class__.__name__)
drives = self.windows_sort_drives(drives)
self._main_prefix = drives.get('main')
self._card_prefix = drives.get('card', None)
def get_osx_mountpoints(self, raw=None): def get_osx_mountpoints(self, raw=None):
if raw is None: if raw is None:
ioreg = '/usr/sbin/ioreg' ioreg = '/usr/sbin/ioreg'