virtManager: object: domain: Simplify agent ready check

Just return the boolean value of the condition for simlicity.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
This commit is contained in:
Michael Weiser 2020-01-03 21:12:31 +01:00 committed by Cole Robinson
parent e4f68764b0
commit 827c948121
1 changed files with 1 additions and 3 deletions

View File

@ -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": {}}