diff --git a/src/calibre/devices/hanlin/driver.py b/src/calibre/devices/hanlin/driver.py index a69907937c..dae1d39c05 100644 --- a/src/calibre/devices/hanlin/driver.py +++ b/src/calibre/devices/hanlin/driver.py @@ -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): diff --git a/src/calibre/devices/usbms/device.py b/src/calibre/devices/usbms/device.py index cc7d1964f6..c84028d699 100644 --- a/src/calibre/devices/usbms/device.py +++ b/src/calibre/devices/usbms/device.py @@ -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