mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 16:59:02 +08: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
@ -125,7 +125,10 @@ class ToolPathUploader:
|
||||
if self._retries < self.MAX_RETRIES and status_code in self.RETRY_HTTP_CODES:
|
||||
self._retries += 1
|
||||
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
|
||||
|
||||
# Http codes that are not to be retried are assumed to be errors.
|
||||
|
Loading…
x
Reference in New Issue
Block a user