From d26569f666c8da152e37464de5ed0147ce7efb62 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Sun, 25 Sep 2022 16:05:03 +0200 Subject: [PATCH] PICARD-2331: Fixed QNetworkReply error handling QNetworkReply.NetworkError.NoError no longer evaluates to False. Set error to None if there was no error. --- picard/webservice/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/picard/webservice/__init__.py b/picard/webservice/__init__.py index cd05adbf05..e50ad01c52 100644 --- a/picard/webservice/__init__.py +++ b/picard/webservice/__init__.py @@ -513,6 +513,7 @@ def _handle_reply(self, reply, request): slow_down = (slow_down or response_code >= 500) else: + error = None redirect = reply.attribute(QNetworkRequest.Attribute.RedirectionTargetAttribute) from_cache = reply.attribute(QNetworkRequest.Attribute.SourceIsFromCacheAttribute) cached = ' (CACHED)' if from_cache else ''