diff options
author | Ghostkeeper <rubend@tutanota.com> | 2021-10-11 15:57:21 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2021-10-11 15:57:21 +0300 |
commit | ffd3277854969b0b06c1cc0f6dc93578443373af (patch) | |
tree | 222e756f145480a89d1f819f883e3c9de9345088 /cura/PrinterOutput | |
parent | ffee4a2443d09b66fb168474523f050ce3621ded (diff) |
Show error if the upload failed
Contributes to issue CURA-8609.
Diffstat (limited to 'cura/PrinterOutput')
-rw-r--r-- | cura/PrinterOutput/UploadMaterialsJob.py | 10 |
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 |