Gitweb:
http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=com...
Commit: feae51039d8986669dd1c3c3009caea4216aaf53
Parent: 5f04219f0ca8ff3b6ef5f6a0f500263749e52803
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Tue Apr 20 12:27:47 2010 +0200
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Tue Apr 20 14:51:54 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#583019
---
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 831cdb1..6646eb9 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -430,7 +430,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:
@@ -438,7 +438,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\" "