From 17fada1183c1530309137faa6857c4b0ed4998b1 Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Fri, 6 Oct 2023 22:31:07 +0200 Subject: check-new-issues: Define set_cve_nfu before using it for automatic processing When automatic NFU entry processing is enabled via the -a flag, then the processing will error out as set_cve_nfu is not known. Move the definition for set_cve_nfu upwards. Signed-off-by: Salvatore Bonaccorso --- bin/check-new-issues | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'bin') diff --git a/bin/check-new-issues b/bin/check-new-issues index facaa5c760..8389943dda 100755 --- a/bin/check-new-issues +++ b/bin/check-new-issues @@ -260,6 +260,14 @@ def read_embedded_copies(): else: syntax_error(f"Cannot parse {line}") +def set_cve_nfu(name, desc): + cve = cves[name] + # remove todo: check annotation... + cve.annotations = [ann for ann in cve.annotations if not ann_is_todo_check(ann)] + # ... and add a NFU annotation + ann = parsers.StringAnnotation(0, "NOT-FOR-US", desc) + cve.annotations.append(ann) + def syntax_error(s): print("embedded-code-copies: " + s, file=sys.stderr) sys.exit(1) @@ -466,14 +474,6 @@ if args.auto: save_datafile(cves.values(), datafile) sys.exit(0) -def set_cve_nfu(name, desc): - cve = cves[name] - # remove todo: check annotation... - cve.annotations = [ann for ann in cve.annotations if not ann_is_todo_check(ann)] - # ... and add a NFU annotation - ann = parsers.StringAnnotation(0, "NOT-FOR-US", desc) - cve.annotations.append(ann) - def print_full_entry(name): print("======================================================") print(f"Name: {name}") -- cgit v1.2.3