Blame SOURCES/virt-manager-capabilities-correctly-parse-cpus-in-the-host-NUMA-t.patch

343f27
From efc7d42b58fec2ccc1acaf8ec1385b867eb1da53 Mon Sep 17 00:00:00 2001
343f27
From: Giuseppe Scrivano <gscrivan@redhat.com>
343f27
Date: Fri, 22 Nov 2013 16:19:05 +0100
343f27
Subject: [RHEL-7.0 virt-manager PATCH] capabilities: correctly parse "cpus" in
343f27
 the host NUMA topology
343f27
343f27
"cpus" might no be the only child element in the "cell" element, so be
343f27
sure to check all children.
343f27
343f27
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1032320
343f27
343f27
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
343f27
(cherry picked from commit e51dd1cf40c6a0ab2da42ca0998b35f8b2daf47c)
343f27
---
343f27
 virtinst/CapabilitiesParser.py | 10 +++++-----
343f27
 1 file changed, 5 insertions(+), 5 deletions(-)
343f27
343f27
diff --git a/virtinst/CapabilitiesParser.py b/virtinst/CapabilitiesParser.py
343f27
index 708dcc4..ca085e3 100644
343f27
--- a/virtinst/CapabilitiesParser.py
343f27
+++ b/virtinst/CapabilitiesParser.py
343f27
@@ -460,11 +460,11 @@ class TopologyCell(object):
343f27
343f27
     def parseXML(self, node):
343f27
         self.id = int(node.prop("id"))
343f27
-        child = node.children
343f27
-        if child.name == "cpus":
343f27
-            for cpu in child.children:
343f27
-                if cpu.name == "cpu":
343f27
-                    self.cpus.append(TopologyCPU(cpu))
343f27
+        for child in node.children:
343f27
+            if child.name == "cpus":
343f27
+                for cpu in child.children:
343f27
+                    if cpu.name == "cpu":
343f27
+                        self.cpus.append(TopologyCPU(cpu))
343f27
343f27
343f27
 class TopologyCPU(object):
343f27
-- 
343f27
1.8.5.1
343f27