Just return the boolean value of the condition for simlicity. Signed-off-by: Michael Weiser <michael.weiser@xxxxxx> --- 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 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list