From: genone Date: Wed, 31 Jan 2007 13:22:00 +0000 (-0000) Subject: Derive getopt parameters from optionmap X-Git-Tag: gentoolkit-0.2.4.3~171 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=579aa5f84f357fe3355f87b25ce1926297e862ea;p=gentoolkit.git Derive getopt parameters from optionmap svn path=/; revision=342 --- 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"]: