Don't explode the log with errors when there's no cloud response

This commit is contained in:
Ian Paschal 2019-02-14 14:24:34 +01:00
parent dbb8514a6a
commit 7a9dbe3a3f

View file

@ -159,6 +159,9 @@ 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)