mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-19 22:59:07 +08:00
Catch ValueErrors from removing callbacks that were already removed
This can happen from asynchronous access. Fixes Sentry issue CURA-3YV.
This commit is contained in:
parent
efeb29c734
commit
fb3f065fe0
@ -169,7 +169,10 @@ class ClusterApiClient:
|
||||
"""
|
||||
|
||||
def parse() -> None:
|
||||
self._anti_gc_callbacks.remove(parse)
|
||||
try:
|
||||
self._anti_gc_callbacks.remove(parse)
|
||||
except ValueError: # Already removed asynchronously.
|
||||
return # Then the rest of the function is also already executed.
|
||||
|
||||
# Don't try to parse the reply if we didn't get one
|
||||
if reply.attribute(QNetworkRequest.Attribute.HttpStatusCodeAttribute) is None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user