Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: c57d8c5a6b3ba804a0d3242fdbd9daeb9476b58d
Parent: e70c7da2565b692bd382df0ba0f44834c134ecd2
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Tue Apr 20 12:27:47 2010 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Tue Apr 20 19:48:18 2010 +0200
fencing: Creating manual pages fails when default value is a list
Problem was concatenating string + list in python. Lists can't be
entered using command line or stdin.
Resolves: rhbz#583053
---
fence/agents/lib/fencing.py.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 0128a20..585baa1 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -434,7 +434,7 @@ def metadata(avail_opt, options, docs):
default = ""
if all_opt[option].has_key("default"):
- default =
"default=\""+all_opt[option]["default"]+"\""
+ default =
"default=\""+str(all_opt[option]["default"])+"\""
elif options.has_key("-" + all_opt[option]["getopt"][:-1]):
if options["-" + all_opt[option]["getopt"][:-1]]:
try:
@@ -442,7 +442,7 @@ def metadata(avail_opt, options, docs):
except TypeError:
## @todo/@note: Currently there is no clean way how to handle lists
## we can create a string from it but we can't set it on command line
- default = "default=\"list of values\""
+ default = "default=\"" + str(options["-" +
all_opt[option]["getopt"][:-1]]) +"\""
elif options.has_key("-" + all_opt[option]["getopt"]):
default = "default=\"true\" "