Catch any exception that happens while trying to eject

This should prevent crashes on eject on any platform.

CURA-106 #done
This commit is contained in:
Arjen Hiemstra 2015-09-29 16:27:13 +02:00
parent 1bcc82a22a
commit de533b660e
2 changed files with 8 additions and 7 deletions

View file

@ -37,7 +37,11 @@ class RemovableDrivePlugin(OutputDevicePlugin):
raise NotImplementedError()
def ejectDevice(self, device):
result = self.performEjectDevice(device)
try:
result = self.performEjectDevice(device)
except Exception as e:
result = False
if result:
message = Message(catalog.i18nc("@info:status", "Ejected {0}. You can now safely remove the drive.").format(device.getName()))
message.show()