From e51dd1cf40c6a0ab2da42ca0998b35f8b2daf47c Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 22 Nov 2013 11:28:09 +0100 Subject: [PATCH] capabilities: correctly parse "cpus" in the host NUMA topology "cpus" might no be the only child element in the "cell" element, so be sure to check all children. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1032320 Signed-off-by: Giuseppe Scrivano --- virtinst/capabilities.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/virtinst/capabilities.py b/virtinst/capabilities.py index ec18ac84e..34edeedc8 100644 --- a/virtinst/capabilities.py +++ b/virtinst/capabilities.py @@ -464,11 +464,11 @@ class TopologyCell(object): def parseXML(self, node): self.id = int(node.prop("id")) - child = node.children - if child.name == "cpus": - for cpu in child.children: - if cpu.name == "cpu": - self.cpus.append(TopologyCPU(cpu)) + for child in node.children: + if child.name == "cpus": + for cpu in child.children: + if cpu.name == "cpu": + self.cpus.append(TopologyCPU(cpu)) class TopologyCPU(object):