[virt-tools-list] [virt-manager PATCH v2 1/6] virtManager: object: domain: Simplify agent ready check
Michael Weiser
michael.weiser at gmx.de
Fri Jan 3 20:12:31 UTC 2020
Just return the boolean value of the condition for simlicity.
Signed-off-by: Michael Weiser <michael.weiser at gmx.de>
---
virtManager/object/domain.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/virtManager/object/domain.py b/virtManager/object/domain.py
index ec62b354..4a1c7587 100644
--- a/virtManager/object/domain.py
+++ b/virtManager/object/domain.py
@@ -1089,9 +1089,7 @@ class vmmDomain(vmmLibvirtObject):
# we need to get a fresh agent channel object on each call so it
# reflects the current state
dev = self._get_agent()
- if dev and dev.target_state == "connected":
- return True
- return False
+ return dev and dev.target_state == "connected"
def refresh_interface_addresses(self, iface):
self._ip_cache = {"qemuga": {}, "arp": {}}
--
2.24.1
More information about the virt-tools-list
mailing list