diff mbox series

[4/6] classes/spdx-common: Return empty list from extract_licenses

Message ID 20240610214456.2757397-5-JPEWhacker@gmail.com
State New
Headers show
Series Add SPDX 3.0 support | expand

Commit Message

Joshua Watt June 10, 2024, 9:41 p.m. UTC
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 <JPEWhacker@gmail.com>
---
 meta/classes/spdx-common.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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'))