From ff7ae5911320c5c85e6823fc586c7d8ccd8a7411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= Date: Sat, 26 Apr 2025 23:04:09 +0200 Subject: [PATCH] support/scripts/cve.py: remove unused each_product() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The last usage of each_product() was removed in commit 52ae092046696f099397d3b0a8206262e8203f40 ("support/scripts/cve.py: use the JSON data in 1.1 schema"). Since it's now unused, remove it. Signed-off-by: Raphaël Mélotte Signed-off-by: Thomas Petazzoni (cherry picked from commit d0a7a468130bcae54d40a6e9f3c7c72664803324) Signed-off-by: Thomas Perale --- support/scripts/cve.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/support/scripts/cve.py b/support/scripts/cve.py index 5af6e0c43f..18fda8e1a1 100755 --- a/support/scripts/cve.py +++ b/support/scripts/cve.py @@ -111,12 +111,6 @@ class CVE: with open(os.path.join(dirpath, filename), "rb") as f: yield cls(json.load(f)) - def each_product(self): - """Iterate over each product section of this cve""" - for vendor in self.nvd_cve['cve']['affects']['vendor']['vendor_data']: - for product in vendor['product']['product_data']: - yield product - def parse_node(self, node): """ Parse the node inside the configurations section to extract the