Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2021-10-11 15:57:21 +0300
committerGhostkeeper <rubend@tutanota.com>2021-10-11 15:57:21 +0300
commitffd3277854969b0b06c1cc0f6dc93578443373af (patch)
tree222e756f145480a89d1f819f883e3c9de9345088 /cura/PrinterOutput
parentffee4a2443d09b66fb168474523f050ce3621ded (diff)
Show error if the upload failed
Contributes to issue CURA-8609.
Diffstat (limited to 'cura/PrinterOutput')
-rw-r--r--cura/PrinterOutput/UploadMaterialsJob.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/cura/PrinterOutput/UploadMaterialsJob.py b/cura/PrinterOutput/UploadMaterialsJob.py
index 13e97a5093..45ac653337 100644
--- a/cura/PrinterOutput/UploadMaterialsJob.py
+++ b/cura/PrinterOutput/UploadMaterialsJob.py
@@ -79,9 +79,11 @@ class UploadMaterialsJob(Job):
if error is not None:
Logger.error(f"Failed to upload material archive: {error}")
self.setResult(self.Result.FAILED)
- return
- self.setResult(self.Result.SUCCESS)
- self.uploadCompleted.emit()
+ else:
+ self.setResult(self.Result.SUCCESS)
+ self.uploadCompleted.emit(self.getResult())
def onError(self, reply: "QNetworkReply", error: Optional["QNetworkReply.NetworkError"]):
- pass # TODO: Handle errors. \ No newline at end of file
+ Logger.error(f"Failed to upload material archive: {error}")
+ self.setResult(self.Result.FAILED)
+ self.uploadCompleted.emit(self.getResult()) \ No newline at end of file