summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu@debian.org>2023-03-20 14:42:18 +0100
committerEmilio Pozuelo Monfort <pochu@debian.org>2023-03-27 10:25:24 +0200
commitbff5b300b56534e1d4fc66116c32b987c70ff46b (patch)
tree504374fc8706f78d87ba4f27c4ff938f11ae1f35 /bin
parent44872491d481780367ce3f3436bafbddae4c1537 (diff)
update-vuln: _add_annotation_to_cve: don't create a new Bug
We can just modify the existing object now.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/update-vuln6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/update-vuln b/bin/update-vuln
index d40a399758..3d733841c4 100755
--- a/bin/update-vuln
+++ b/bin/update-vuln
@@ -120,14 +120,14 @@ class ParseUpdates:
bug_list = []
for item in existing:
bug_list.append(store[item])
+ bug.annotations = bug_list
elif isinstance(annotation, StringAnnotation):
- bug_list = list(bug.annotations)
- bug_list.append(annotation)
+ bug.annotations.append(annotation)
else:
raise ValueError(f"Unsupported annotation type: {type(annotation)}")
- return Bug(bug.file, bug.header, tuple(bug_list))
+ return bug
def _replace_annotation_on_line(self, cve, line, mod_line):
index = self.bugs[cve].annotations.index(line)

© 2014-2024 Faster IT GmbH | imprint | privacy policy