diff mbox series

[2/6] meta/lib/oe/sbom30.py: correct typo

Message ID 20241026032519.1968518-3-hongxu.jia@windriver.com
State Accepted, archived
Commit 038dcdca760404a44e0bcef389b4b60903f14a1f
Headers show
Series Support SPDX include source for work-share directory | expand

Commit Message

Hongxu Jia Oct. 26, 2024, 3:25 a.m. UTC
The isinstance expected 2 arguments

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/lib/oe/sbom30.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joshua Watt Oct. 28, 2024, 7:47 p.m. UTC | #1
LGTM, thanks

Reviewed-by: Joshua Watt <JPEWhacker@gmail.com>

On Fri, Oct 25, 2024 at 9:25 PM Hongxu Jia <hongxu.jia@windriver.com> wrote:
>
> The isinstance expected 2 arguments
>
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
>  meta/lib/oe/sbom30.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/lib/oe/sbom30.py b/meta/lib/oe/sbom30.py
> index 73a957a20c..f4cc1f49dd 100644
> --- a/meta/lib/oe/sbom30.py
> +++ b/meta/lib/oe/sbom30.py
> @@ -631,7 +631,7 @@ class ObjectSet(oe.spdx30.SHACLObjectSet):
>          sha256_hash = bb.utils.sha256_file(path)
>
>          for f in self.by_sha256_hash.get(sha256_hash, []):
> -            if not isinstance(oe.spdx30.software_File):
> +            if not isinstance(f, oe.spdx30.software_File):
>                  continue
>
>              if purposes:
> --
> 2.25.1
>
diff mbox series

Patch

diff --git a/meta/lib/oe/sbom30.py b/meta/lib/oe/sbom30.py
index 73a957a20c..f4cc1f49dd 100644
--- a/meta/lib/oe/sbom30.py
+++ b/meta/lib/oe/sbom30.py
@@ -631,7 +631,7 @@  class ObjectSet(oe.spdx30.SHACLObjectSet):
         sha256_hash = bb.utils.sha256_file(path)
 
         for f in self.by_sha256_hash.get(sha256_hash, []):
-            if not isinstance(oe.spdx30.software_File):
+            if not isinstance(f, oe.spdx30.software_File):
                 continue
 
             if purposes: