This is nicer as the normal return type is a list, so the calling code
doesn't have to deal with a None sometimes and a list others.

Signed-off-by: Joshua Watt <[email protected]>
---
 meta/classes/spdx-common.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/spdx-common.bbclass b/meta/classes/spdx-common.bbclass
index f6fc182838d..03f1d0cc278 100644
--- a/meta/classes/spdx-common.bbclass
+++ b/meta/classes/spdx-common.bbclass
@@ -58,7 +58,7 @@ def extract_licenses(filename):
                 return ascii_licenses
     except Exception as e:
         bb.warn(f"Exception reading {filename}: {e}")
-    return None
+    return []
 
 def is_work_shared_spdx(d):
     return bb.data.inherits_class('kernel', d) or ('work-shared' in 
d.getVar('WORKDIR'))
-- 
2.43.2

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

Reply via email to