diff mbox series

[1/1] support/scripts/cve.py: remove unused each_product()

Message ID 20250426210411.1120310-1-raphael.melotte@mind.be
State Accepted
Headers show
Series [1/1] support/scripts/cve.py: remove unused each_product() | expand

Commit Message

Raphaël Mélotte April 26, 2025, 9:04 p.m. UTC
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 <raphael.melotte@mind.be>
---
 support/scripts/cve.py | 6 ------
 1 file changed, 6 deletions(-)

Comments

Thomas Petazzoni May 17, 2025, 3:28 p.m. UTC | #1
On Sat, 26 Apr 2025 23:04:09 +0200
Raphaël Mélotte via buildroot <buildroot@buildroot.org> wrote:

> 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 <raphael.melotte@mind.be>
> ---
>  support/scripts/cve.py | 6 ------
>  1 file changed, 6 deletions(-)

Applied to master, thanks.

Thomas
Arnout Vandecappelle May 31, 2025, 5 p.m. UTC | #2
On 26/04/2025 23:04, Raphaël Mélotte via buildroot wrote:
> 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 <raphael.melotte@mind.be>

  Applied to 2025.02.x, thanks.

  Regards,
  Arnout

> ---
>   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
diff mbox series

Patch

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