From 5f87388fb7540c6115068f5ff475c9a14f0d0a7c Mon Sep 17 00:00:00 2001 From: genone Date: Wed, 8 Dec 2004 10:40:53 +0000 Subject: [PATCH] added argument check svn path=/; revision=179 --- trunk/ChangeLog | 2 +- trunk/src/glsa-check/glsa-check | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/trunk/ChangeLog b/trunk/ChangeLog index 253b743..d7a6a79 100644 --- a/trunk/ChangeLog +++ b/trunk/ChangeLog @@ -1,9 +1,9 @@ 2004-12-08 Marius Mauch * equery: implemented the --category option * glsa-check: fixed the bug where it wanted to unnecessary merge masked packages + * glsa-check: Added a check to verify that all non-option arguments are valid GLSAs * glsa.py: changed the outfile parameter in Glsa.dump() to outstream so we don't have to open/close a file which breaks pipes - 2004-11-29 Karl Trygve Kalleberg * branched v0-3-0: major rework in equery is in progess. the main branch is reserved for minor and incremental fixups. diff --git a/trunk/src/glsa-check/glsa-check b/trunk/src/glsa-check/glsa-check index 4d682f0..751a658 100644 --- a/trunk/src/glsa-check/glsa-check +++ b/trunk/src/glsa-check/glsa-check @@ -135,6 +135,13 @@ if "new" in params: if "all" in params: glsalist = completelist params.remove("all") + +# remove invalid parameters +for p in params[:]: + if not (p in completelist or os.path.exists(p)): + print "(removing %s from parameter list as it isn't a valid GLSA specification)" % p + params.remove(p) + glsalist.extend([g for g in params if g not in glsalist]) # list short information for given or new GLSA -- 2.26.2