Fix #5269 (Should unmount Bebook Mini on OS X instead of eject)

This commit is contained in:
Kovid Goyal 2010-04-17 18:20:52 +05:30
parent 7c8055b888
commit ec9e1b825c
2 changed files with 3 additions and 1 deletions

View File

@ -105,6 +105,7 @@ class HANLINV5(HANLINV3):
MAIN_MEMORY_VOLUME_LABEL = 'Hanlin V5 Internal Memory'
STORAGE_CARD_VOLUME_LABEL = 'Hanlin V5 Storage Card'
OSX_EJECT_COMMAND = ['diskutil', 'unmount', 'force']
class BOOX(HANLINV3):

View File

@ -76,6 +76,7 @@ class Device(DeviceConfig, DevicePlugin):
# storage cards. Should be a regular expression that matches the
# main memory mount point assigned by OS X
OSX_MAIN_MEM_VOL_PAT = None
OSX_EJECT_COMMAND = ['diskutil', 'eject']
MAIN_MEMORY_VOLUME_LABEL = ''
STORAGE_CARD_VOLUME_LABEL = ''
@ -669,7 +670,7 @@ class Device(DeviceConfig, DevicePlugin):
x = getattr(self, x, None)
if x is not None:
try:
subprocess.Popen(['diskutil', 'eject', x])
subprocess.Popen(self.OSX_EJECT_COMMAND + [x])
except:
pass