summaryrefslogtreecommitdiff
path: root/trunk/src
diff options
context:
space:
mode:
authorgenone <genone@gentoo.org>2007-01-31 13:22:00 +0000
committergenone <genone@gentoo.org>2007-01-31 13:22:00 +0000
commit579aa5f84f357fe3355f87b25ce1926297e862ea (patch)
treee7c14ae4bbb06b162b32ddead95e2d52238fa448 /trunk/src
parent34c0a7e614969dd364838cb2dba954e2302bff82 (diff)
downloadgentoolkit-579aa5f84f357fe3355f87b25ce1926297e862ea.tar.gz
Derive getopt parameters from optionmap
svn path=/; revision=342
Diffstat (limited to 'trunk/src')
-rw-r--r--trunk/src/glsa-check/glsa-check5
1 files changed, 3 insertions, 2 deletions
diff --git a/trunk/src/glsa-check/glsa-check b/trunk/src/glsa-check/glsa-check
index d652936..756aa9a 100644
--- a/trunk/src/glsa-check/glsa-check
+++ b/trunk/src/glsa-check/glsa-check
@@ -40,8 +40,9 @@ optionmap = [
args = []
params = []
try:
- args, params = getopt(sys.argv[1:], "dplfchinvVtcm", \
- ["dump", "print", "list", "pretend", "fix", "inject", "help", "info", "version", "test", "nocolor", "cve", "mail"])
+ args, params = getopt(sys.argv[1:], "".join([o[0][1] for o in optionmap]), \
+ [x[2:] for x in reduce(lambda x,y: x+y, [z[1:-1] for z in optionmap])])
+# ["dump", "print", "list", "pretend", "fix", "inject", "help", "verbose", "version", "test", "nocolor", "cve", "mail"])
args = [a for a,b in args]
for option in ["--nocolor", "-n"]: