mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-10-04 16:46:30 +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:
|
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
|
# Don't try to parse the reply if we didn't get one
|
||||||
if reply.attribute(QNetworkRequest.Attribute.HttpStatusCodeAttribute) is None:
|
if reply.attribute(QNetworkRequest.Attribute.HttpStatusCodeAttribute) is None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user