diff mbox series

[02/10] support/scripts/cve-checker: parse arguments earlier

Message ID 20201104145145.1316167-3-thomas.petazzoni@bootlin.com
State Not Applicable
Headers show
Series Introduce CPE ID matching for CVEs | expand

Commit Message

Thomas Petazzoni Nov. 4, 2020, 2:51 p.m. UTC
This allows to have --help working, and the argument error checking
before we read from stdin, and potentially block if we get nothing on
stdin.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 support/scripts/cve-checker | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Thomas Petazzoni Nov. 26, 2020, 3:32 p.m. UTC | #1
On Wed,  4 Nov 2020 15:51:36 +0100
Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> This allows to have --help working, and the argument error checking
> before we read from stdin, and potentially block if we get nothing on
> stdin.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

cve-checker has been dropped from Buildroot now, so this patch no
longer makes sense. I've marked it as Not Applicable in patchwork.

Thomas
diff mbox series

Patch

diff --git a/support/scripts/cve-checker b/support/scripts/cve-checker
index 998ea5b8af..ff110fc17c 100755
--- a/support/scripts/cve-checker
+++ b/support/scripts/cve-checker
@@ -172,6 +172,8 @@  def parse_args():
 
 
 def __main__():
+    args = parse_args()
+
     packages = list()
     content = json.load(sys.stdin)
     for item in content:
@@ -179,7 +181,6 @@  def __main__():
         p = Package(item, pkg.get('version', ''), pkg.get('ignore_cves', ''))
         packages.append(p)
 
-    args = parse_args()
     date = datetime.datetime.utcnow()
 
     print("Checking packages CVEs")