RemovableDriveOutputDevice: Use device.getId()

Should fix unmounting on OSX. Found this solution in Linux*.py.

Untested and fingers crossed...
This commit is contained in:
Thomas-Karl Pietrowski 2016-03-14 17:07:02 +01:00
parent 3b8000035d
commit 5a5664e164

View file

@ -43,7 +43,7 @@ class OSXRemovableDrivePlugin(RemovableDrivePlugin.RemovableDrivePlugin):
return drives return drives
def performEjectDevice(self, device): def performEjectDevice(self, device):
p = subprocess.Popen(["diskutil", "eject", path], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) p = subprocess.Popen(["diskutil", "eject", device.getId()], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output = p.communicate() output = p.communicate()
Logger.log("d", "umount returned: %s.", repr(output)) Logger.log("d", "umount returned: %s.", repr(output))