diff options
author | Salvatore Bonaccorso <carnil@debian.org> | 2023-10-06 22:31:07 +0200 |
---|---|---|
committer | Salvatore Bonaccorso <carnil@debian.org> | 2023-10-06 22:31:07 +0200 |
commit | 17fada1183c1530309137faa6857c4b0ed4998b1 (patch) | |
tree | 0949fea6ec408451e0f4a7c39f581ffdff7fc6e1 | |
parent | c96bf0c27c5c1a3e2491a8095b179162ff1028a6 (diff) |
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 <carnil@debian.org>
-rwxr-xr-x | bin/check-new-issues | 16 |
1 files changed, 8 insertions, 8 deletions
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}") |