fencing: fix parsing issue with options which don't have short opt
PATCH 1/1 fencing: fix parsing issue with options which don't have short opt
In reply to a message not in the archiveThere was problem with options which have value, but we don't want short opt for them. In this case we can now use getopt = ":".
--- fence/agents/lib/fencing.py.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fence/agents/lib/fencing.py.py +2 -1
@@ -559,7 +559,8 @@ def process_input(avail_opt): getopt_string = "" longopt_list = [] for k in avail_opt: - if all_opt.has_key(k): + if all_opt.has_key(k) and all_opt[k]["getopt"] != ":": + # getopt == ":" means that opt is without short getopt, but has value getopt_string += all_opt[k]["getopt"] else: fail_usage("Parse error: unknown option '"+k+"'")
Signature · 1 line
1.8.3.1