Skip to content

Commit

Permalink
Merge pull request #5862 from liang-cong-red-hat/numa_cpu_topology_ch…
Browse files Browse the repository at this point in the history
…ange_comparison_logic

Change comparison logic, including xml element without child element
  • Loading branch information
dzhengfy authored Aug 27, 2024
2 parents e158ba2 + e070c23 commit 6353d0f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ def prepare_vm_xml(test_obj):
cpu_topology = eval(test_obj.params.get('cpu_topology', '{}'))
vmxml = vm_xml.VMXML.new_from_inactive_dumpxml(test_obj.vm.name)
if numa_cells:
if vmxml.xmltreefile.find('cpu'):
if vmxml.xmltreefile.find('cpu') is not None:
cpuxml = vmxml.cpu
if cpuxml.xmltreefile.find('topology'):
if cpuxml.xmltreefile.find('topology') is not None:
del cpuxml.topology
else:
cpuxml = vm_xml.VMCPUXML()
Expand Down

0 comments on commit 6353d0f

Please sign in to comment.