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.
This commit is contained in:
Ghostkeeper 2022-04-11 10:00:09 +02:00
parent c4baece3ac
commit 0deac84ec2
No known key found for this signature in database
GPG key ID: 68F39EA88EEED5FF

View file

@ -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