From 0deac84ec2852ae0e7a3c9d4fb8c1ed91fc901d7 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 11 Apr 2022 10:00:09 +0200 Subject: [PATCH] NetworkError is an enum, no longer comparable as int With the Qt6 upgrade, we have to treat enums as full enums, within their normal class namespace and such. They are no longer just integer-globals static in the QtCore.Qt class. They are no longer treated as integers by PyQt. Other places that checked for such errors were already doing it like this. Contributes to issue CURA-9100. --- plugins/UM3NetworkPrinting/src/Network/ClusterApiClient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/src/Network/ClusterApiClient.py b/plugins/UM3NetworkPrinting/src/Network/ClusterApiClient.py index b3df000f7b..773e2b5902 100644 --- a/plugins/UM3NetworkPrinting/src/Network/ClusterApiClient.py +++ b/plugins/UM3NetworkPrinting/src/Network/ClusterApiClient.py @@ -176,7 +176,7 @@ class ClusterApiClient: if reply.attribute(QNetworkRequest.Attribute.HttpStatusCodeAttribute) is None: return - if reply.error() > 0: + if reply.error() != QNetworkReply.NetworkError.NoError: self._on_error(reply.errorString()) return