From: "Kamel Bouhara (Schneider Electric)" <[email protected]>

The add_download_files() function incorrectly accessed fd.name, which
does not exist on FetchData objects.

Change to use fd.names[0] to correctly retrieve the first filename.

This fixes AttributeError during SPDX document generation.

Signed-off-by: Kamel Bouhara (Schneider Electric) <[email protected]>
---
 meta/lib/oe/spdx30_tasks.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oe/spdx30_tasks.py b/meta/lib/oe/spdx30_tasks.py
index 52329760b6..f6e6e545dc 100644
--- a/meta/lib/oe/spdx30_tasks.py
+++ b/meta/lib/oe/spdx30_tasks.py
@@ -405,7 +405,7 @@ def add_download_files(d, objset):
                     name=file_name,
                     software_primaryPurpose=primary_purpose,
                     software_downloadLocation=oe.spdx_common.fetch_data_to_uri(
-                        fd, fd.name
+                        fd, fd.names[0]
                     ),
                 )
             )
-- 
2.43.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#226038): 
https://lists.openembedded.org/g/openembedded-core/message/226038
Mute This Topic: https://lists.openembedded.org/mt/116169969/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to