mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Cura no longer crashes when writing to full SD drive.
It instead tells warns the user and logs the event. CURA-3909
This commit is contained in:
parent
98795d8953
commit
be1b5cd83a
1 changed files with 11 additions and 2 deletions
|
@ -123,8 +123,17 @@ class RemovableDriveOutputDevice(OutputDevice):
|
|||
def _onFinished(self, job):
|
||||
if self._stream:
|
||||
# Explicitly closing the stream flushes the write-buffer
|
||||
self._stream.close()
|
||||
self._stream = None
|
||||
try:
|
||||
self._stream.close()
|
||||
self._stream = None
|
||||
except:
|
||||
Logger.logException("w", "An execption occured while trying to write to removable drive.")
|
||||
message = Message(catalog.i18nc("@info:status", "Could not save to removable drive {0}: {1}").format(self.getName(),
|
||||
str(
|
||||
job.getError())))
|
||||
message.show()
|
||||
self.writeError.emit(self)
|
||||
return
|
||||
|
||||
self._writing = False
|
||||
self.writeFinished.emit(self)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue