--- glsa-check.orig 2007-03-13 21:56:32.000000000 +0100 +++ glsa-check 2007-03-13 21:43:16.000000000 +0100 @@ -25,6 +25,7 @@ ["-V", "--version", "some information about this tool"], ["-v", "--verbose", "print more information (option)"], ["-c", "--cve", "show CAN ids in listing mode (option)"], +["-q", "--quiet", "be less verbose (option)"], ["-m", "--mail", "send a mail with the given GLSAs to the administrator"] ] @@ -62,6 +63,13 @@ list_cve = True args.remove(option) + quiet = False + for option in ["--quiet", "-q"]: + if option in args: + quiet = True + args.remove(option) + + # sanity checking if len(args) <= 0: sys.stderr.write("no option given: what should I do ?\n") @@ -163,9 +171,9 @@ glsalist.extend([g for g in params if g not in glsalist]) def summarylist(myglsalist, fd1=sys.stdout, fd2=sys.stderr): - fd2.write(white("[A]")+" means this GLSA was already applied,\n") - fd2.write(green("[U]")+" means the system is not affected and\n") - fd2.write(red("[N]")+" indicates that the system might be affected.\n\n") + if not quiet: fd2.write(white("[A]")+" means this GLSA was already applied,\n") + if not quiet: fd2.write(green("[U]")+" means the system is not affected and\n") + if not quiet: fd2.write(red("[N]")+" indicates that the system might be affected.\n\n") for myid in myglsalist: try: