From: Ondrej Mular Date: Fri, 21 Feb 2014 07:03:23 -0500 (EST) Subject: [Cluster-devel] [PATCH 1/2] fencing: accept only options used in fence-agent In-Reply-To: <219896817.5292758.1392981632889.JavaMail.zimbra@redhat.com> Message-ID: <342569747.5306062.1392984203296.JavaMail.zimbra@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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(-) diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py index 889bb04..8f214d7 100644 --- a/fence/agents/lib/fencing.py.py +++ b/fence/agents/lib/fencing.py.py @@ -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] -- 1.8.3.1