diff options
author | Emilio Pozuelo Monfort <pochu@debian.org> | 2023-03-20 14:42:18 +0100 |
---|---|---|
committer | Emilio Pozuelo Monfort <pochu@debian.org> | 2023-03-27 10:25:24 +0200 |
commit | bff5b300b56534e1d4fc66116c32b987c70ff46b (patch) | |
tree | 504374fc8706f78d87ba4f27c4ff938f11ae1f35 /bin | |
parent | 44872491d481780367ce3f3436bafbddae4c1537 (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-x | bin/update-vuln | 6 |
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) |