mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Fail gracefully if writing the backup to a temp file crashes
Fixes sentry issue CURA-21W
This commit is contained in:
parent
544b267447
commit
df5c52d1c6
1 changed files with 5 additions and 1 deletions
|
|
@ -61,7 +61,11 @@ class RestoreBackupJob(Job):
|
|||
app = CuraApplication.getInstance()
|
||||
bytes_read = reply.read(self.DISK_WRITE_BUFFER_SIZE)
|
||||
while bytes_read:
|
||||
try:
|
||||
write_backup.write(bytes_read)
|
||||
except Exception as e:
|
||||
Logger.logException("e", "An error occurred while writing the backup to a temporary file: {}. The restoration of the backup is aborted.".format(e))
|
||||
return
|
||||
bytes_read = reply.read(self.DISK_WRITE_BUFFER_SIZE)
|
||||
app.processEvents()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue