diff options
author | Emilio Pozuelo Monfort <pochu@debian.org> | 2023-03-20 13:58:42 +0100 |
---|---|---|
committer | Emilio Pozuelo Monfort <pochu@debian.org> | 2023-03-27 10:25:24 +0200 |
commit | 84507f829ab84f5175729e8e2ff7774a81b953bb (patch) | |
tree | d78777ab81c3e42fa0366da5300262417da6aa81 /bin | |
parent | ccd6a86f9f51249032e087827f7b381d9c412a8e (diff) |
grab-cve-in-fix: don't call _replace
We can just modify the bug instance and add it to the modified
list. The data list is modified too, bug we don't do anything
else with it.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/grab-cve-in-fix | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/bin/grab-cve-in-fix b/bin/grab-cve-in-fix index 109fdf3e7b..ec65e776b7 100755 --- a/bin/grab-cve-in-fix +++ b/bin/grab-cve-in-fix @@ -189,12 +189,8 @@ class ParseChanges: ) if vcompare < 0: self.logger.info("Updating %s to %s", line.version, self.unstable_version) - mod_line = line._replace(version=self.unstable_version) - index = bug.annotations.index(line) - bug_list = list(bug.annotations) - bug_list[index] = mod_line - mod_bug = Bug(bug.file, bug.header, tuple(bug_list)) - modified.append(mod_bug) + line.version = self.unstable_version + modified.append(bug) elif vcompare > 0: self.logger.error( "%s is listed as fixed in %s which is newer than %s", @@ -210,12 +206,8 @@ class ParseChanges: line.version, ) else: - mod_line = line._replace(version=self.unstable_version) - index = bug.annotations.index(line) - bug_list = list(bug.annotations) - bug_list[index] = mod_line - mod_bug = Bug(bug.file, bug.header, tuple(bug_list)) - modified.append(mod_bug) + line.version = self.unstable_version + modified.append(bug) if not modified: return 0 if os.path.exists(cve_file): |