fencing: accept only options used in fence-agent
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/2 fencing: accept only options used in fence-agent
In transformation from short options to long options, was used list of all options. That caused collision of options if there was 2 options with same short name, but only one was used in fence-agent.
--- fence/agents/lib/fencing.py.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fence/agents/lib/fencing.py.py +1 -1
@@ -563,7 +563,7 @@ def process_input(avail_opt): opt["--" + all_opt[x]["longopt"]] = dict(old_opt)[o] else: for x in all_opt.keys(): - if all_opt[x].has_key("getopt") and all_opt[x].has_key("longopt") and \ + if x in avail_opt and all_opt[x].has_key("getopt") and all_opt[x].has_key("longopt") and \ ("-" + all_opt[x]["getopt"] == o or "-" + all_opt[x]["getopt"].rstrip(":") == o): opt["--" + all_opt[x]["longopt"]] = dict(old_opt)[o] opt[o] = dict(old_opt)[o]
Signature · 1 line
1.8.3.1