When SlaveMachine param was entered as int, lnst-ctl list_pools action
would fail on concatenating str and int object. This patch fixes that by
retyping the value to str type.
This behaviour was added for SlaveMachine params, network and interface
params.
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
lnst-ctl | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lnst-ctl b/lnst-ctl
index c4146b0..42ab022 100755
--- a/lnst-ctl
+++ b/lnst-ctl
@@ -98,15 +98,16 @@ def list_pools(restrict_pools, verbose):
out += 3*" " + filename + ".xml\n"
out += 5*" " + "params:\n"
for key in pool['params']:
- out += 7*" " + key + " : " +
pool['params'][key] + "\n"
+ out += 7*" " + key + " : " +\
+ str(pool['params'][key]) + "\n"
if pool['interfaces']:
out += 5*" " + "interfaces:\n"
for key in sorted(pool['interfaces']):
out += 7*" " + "id : " + key + "\tlabel :
" +\
- pool['interfaces'][key]['network'] +
"\n"
+ str(pool['interfaces'][key]['network']) +
"\n"
for param in pool['interfaces'][key]['params']:
out += 9*" " + param + " : " +\
- pool['interfaces'][key]['params'][param] +
"\n"
+ str(pool['interfaces'][key]['params'][param])
+ "\n"
out += "\n"
# print wihout newlines on the end of string
if verbose:
--
2.4.11
Show replies by thread