[virt-tools-list] [PATCH] capabilities: correctly parse "cpus" in the host NUMA topology
Giuseppe Scrivano
gscrivan at redhat.com
Fri Nov 22 11:28:03 UTC 2013
"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 <gscrivan at redhat.com>
---
virtinst/capabilities.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/virtinst/capabilities.py b/virtinst/capabilities.py
index ec18ac8..34edeed 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):
--
1.8.3.1
More information about the virt-tools-list
mailing list