USBMS: Move windows sort drives before checks for main. Should fix a bug detecting iriver story.

This commit is contained in:
John Schember 2009-12-18 19:05:59 -05:00
parent 34ed17519b
commit 11427001a3
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ class IRIVER_STORY(USBMS):
name = 'Iriver Story Device Interface'
gui_name = 'Iriver Story'
description = _('Communicate with the Iriver Story reader.')
author = _('Kovid Goyal')
author = 'Kovid Goyal'
supported_platforms = ['windows', 'osx', 'linux']
# Ordered list of supported formats

View File

@ -302,13 +302,13 @@ class Device(DeviceConfig, DevicePlugin):
drives['main'] = drives.pop('carda')
drives = self.windows_open_callback(drives)
drives = self.windows_sort_drives(drives)
if drives.get('main', None) is None:
raise DeviceError(
_('Unable to detect the %s disk drive. Try rebooting.') %
self.__class__.__name__)
drives = self.windows_sort_drives(drives)
self._main_prefix = drives.get('main')
self._card_a_prefix = drives.get('carda', None)
self._card_b_prefix = drives.get('cardb', None)