From 579aa5f84f357fe3355f87b25ce1926297e862ea Mon Sep 17 00:00:00 2001 From: genone Date: Wed, 31 Jan 2007 13:22:00 +0000 Subject: [PATCH] Derive getopt parameters from optionmap svn path=/; revision=342 --- trunk/src/glsa-check/glsa-check | 5 +++-- 1 file 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"]: -- 2.26.2