Use list comprehension to compare against source

This commit is contained in:
Joshua Boniface 2021-06-22 02:31:14 -04:00
parent 26dd24e3f5
commit 07dbd55f03
1 changed files with 1 additions and 1 deletions

View File

@ -300,7 +300,7 @@ def modify_vm(zkhandler, domain, restart, new_vm_config):
dnetworks = common.getDomainNetworks(parsed_xml, {}) dnetworks = common.getDomainNetworks(parsed_xml, {})
for network in dnetworks: for network in dnetworks:
# Ignore networks that are already there # Ignore networks that are already there
if network in old_dnetworks: if network['source'] in [net['source'] for net in old_dnetworks]:
continue continue
if network['type'] in ['direct', 'hostdev']: if network['type'] in ['direct', 'hostdev']: