mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Merge branch 'prevent_throwing_exception_when_not_connected' of github.com:Ultimaker/Cura
This commit is contained in:
commit
1e7875de48
1 changed files with 5 additions and 1 deletions
|
@ -174,9 +174,13 @@ class CloudApiClient:
|
|||
model: Type[CloudApiClientModel],
|
||||
) -> None:
|
||||
def parse() -> None:
|
||||
# Don't try to parse the reply if we didn't get one
|
||||
if reply.attribute(QNetworkRequest.HttpStatusCodeAttribute) is None:
|
||||
return
|
||||
status_code, response = self._parseReply(reply)
|
||||
self._anti_gc_callbacks.remove(parse)
|
||||
return self._parseModels(response, on_finished, model)
|
||||
self._parseModels(response, on_finished, model)
|
||||
return
|
||||
|
||||
self._anti_gc_callbacks.append(parse)
|
||||
reply.finished.connect(parse)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue