cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] fencing: fix parsing issue with options which don't have short opt
       [not found] <48424497.23419897.1403777263040.JavaMail.zimbra@redhat.com>
@ 2014-06-26 10:38 ` Ondrej Mular
  0 siblings, 0 replies; only message in thread
From: Ondrej Mular @ 2014-06-26 10:38 UTC (permalink / raw)
  To: cluster-devel.redhat.com

There 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(-)

diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 5084f24..2cfa046 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -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+"'")
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-06-26 10:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <48424497.23419897.1403777263040.JavaMail.zimbra@redhat.com>
2014-06-26 10:38 ` [Cluster-devel] [PATCH] fencing: fix parsing issue with options which don't have short opt Ondrej Mular

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).