From 07dbd55f033ae4e84361024f6d7270b0fbbb00bf Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 22 Jun 2021 02:31:14 -0400 Subject: [PATCH] Use list comprehension to compare against source --- daemon-common/vm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon-common/vm.py b/daemon-common/vm.py index a8585799..7b8dc2f9 100644 --- a/daemon-common/vm.py +++ b/daemon-common/vm.py @@ -300,7 +300,7 @@ def modify_vm(zkhandler, domain, restart, new_vm_config): dnetworks = common.getDomainNetworks(parsed_xml, {}) for network in dnetworks: # Ignore networks that are already there - if network in old_dnetworks: + if network['source'] in [net['source'] for net in old_dnetworks]: continue if network['type'] in ['direct', 'hostdev']: