mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07: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
1 changed files with 4 additions and 1 deletions
|
|
@ -169,7 +169,10 @@ class ClusterApiClient:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def parse() -> None:
|
def parse() -> None:
|
||||||
|
try:
|
||||||
self._anti_gc_callbacks.remove(parse)
|
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…
Add table
Add a link
Reference in a new issue