mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 05:58:58 +08:00
RemovableDriveOutputDevice: Same for OSX
See 0b0bc8080591a5cce098e9d47ff12224c924347d
This commit is contained in:
parent
0b0bc80805
commit
19ccfdfbd7
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
from . import RemovableDrivePlugin
|
from . import RemovableDrivePlugin
|
||||||
|
|
||||||
|
from UM.Logger import Logger
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
@ -46,6 +48,7 @@ class OSXRemovableDrivePlugin(RemovableDrivePlugin.RemovableDrivePlugin):
|
|||||||
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", path], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
output = p.communicate()
|
output = p.communicate()
|
||||||
|
Logger.log("d", "umount returned: %s.", repr(output))
|
||||||
|
|
||||||
return_code = p.wait()
|
return_code = p.wait()
|
||||||
if return_code != 0:
|
if return_code != 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user