cluster: STABLE3 - fencing: Creating manual pages fails when default value is a list
Marek Grác
marx at fedoraproject.org
Tue Apr 20 10:34:03 UTC 2010
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=2db59f61a6ffd024c780e1dfb59a6dfb9ca19104
Commit: 2db59f61a6ffd024c780e1dfb59a6dfb9ca19104
Parent: 18175f51f101ff9a62e46c86a920c53a5f4c6ade
Author: Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate: Tue Apr 20 12:27:47 2010 +0200
Committer: Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Tue Apr 20 12:27:47 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\" "
More information about the cluster-commits
mailing list