virt-manager/060-Fix-some-pylint.patch

36 lines
1.4 KiB
Diff
Raw Normal View History

Subject: Fix some pylint
From: Cole Robinson crobinso@redhat.com Mon Jan 22 17:15:11 2024 -0500
Date: Mon Jan 22 17:15:11 2024 -0500:
Git: c399353e00b37ae00c614c7e52a1369e6e816820
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/virtManager/details/viewers.py b/virtManager/details/viewers.py
index 68c97bdb..2a8a7857 100644
--- a/virtManager/details/viewers.py
+++ b/virtManager/details/viewers.py
@@ -618,8 +618,8 @@ class SpiceViewer(Viewer):
self._main_channel, "notify::agent-connected",
self._agent_connected_cb)
- elif (type(channel) == SpiceClientGLib.DisplayChannel and
- not self._display):
+ elif (isinstance(channel, SpiceClientGLib.DisplayChannel) and
+ not self._display):
channel_id = channel.get_property("channel-id")
if channel_id != 0: # pragma: no cover
diff --git a/virtinst/diskbackend.py b/virtinst/diskbackend.py
index 5f80c437..abfaab26 100644
--- a/virtinst/diskbackend.py
+++ b/virtinst/diskbackend.py
@@ -753,7 +753,7 @@ class StorageBackend(_StorageBase):
self._exists = True
elif self._path is None:
self._exists = True
- elif (not self.get_dev_type() == "network" and
+ elif (self.get_dev_type() != "network" and
not self._conn.is_remote() and
os.path.exists(self._path)):
self._exists = True