mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 09:47:50 -06:00
Prevent a crash when retrying even though it completed in the meanwhile
Fixes Sentry issue CURA-NA.
This commit is contained in:
parent
bf3d6c67d9
commit
dcac9b6a87
1 changed files with 4 additions and 1 deletions
|
@ -125,7 +125,10 @@ class ToolPathUploader:
|
||||||
if self._retries < self.MAX_RETRIES and status_code in self.RETRY_HTTP_CODES:
|
if self._retries < self.MAX_RETRIES and status_code in self.RETRY_HTTP_CODES:
|
||||||
self._retries += 1
|
self._retries += 1
|
||||||
Logger.log("i", "Retrying %s/%s request %s", self._retries, self.MAX_RETRIES, reply.url().toString())
|
Logger.log("i", "Retrying %s/%s request %s", self._retries, self.MAX_RETRIES, reply.url().toString())
|
||||||
self._uploadChunk()
|
try:
|
||||||
|
self._uploadChunk()
|
||||||
|
except ValueError: # Asynchronously it could have completed in the meanwhile.
|
||||||
|
pass
|
||||||
return
|
return
|
||||||
|
|
||||||
# Http codes that are not to be retried are assumed to be errors.
|
# Http codes that are not to be retried are assumed to be errors.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue