commit 6b1272ec30b13c0e3d4185daa85bc75e584e222f
Author: Jan Tluka <jtluka(a)redhat.com>
Date: Tue Feb 5 14:17:21 2013 +0100
fix crash in xml attribute handling method
If rpcport attribute is set in any machine description file in machine
pool the controller will crash in setAttribute method since it expects
string rather than integer. To avoid this the variable is converted to
string.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
lnst/Controller/MachinePool.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lnst/Controller/MachinePool.py b/lnst/Controller/MachinePool.py
index 9deb96f..92ddf41 100644
--- a/lnst/Controller/MachinePool.py
+++ b/lnst/Controller/MachinePool.py
@@ -129,7 +129,7 @@ class MachinePool:
supported = ["hostname", "libvirt_domain",
"rpcport"]
for attr_name, attr_val in self._pool[pm_id]["info"].iteritems():
if attr_name in supported:
- info.setAttribute(attr_name, attr_val)
+ info.setAttribute(attr_name, str(attr_val))
mcfg.appendChild(info)
netdevices = dom.createElement("netdevices")
Show replies by date