]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
classes/spdx-common: Return empty list from extract_licenses
authorJoshua Watt <JPEWhacker@gmail.com>
Mon, 10 Jun 2024 21:41:50 +0000 (15:41 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 12 Jun 2024 15:15:40 +0000 (16:15 +0100)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/spdx-common.bbclass

index f6fc182838d2e367b12e5ef58cb3d31b7d7ec244..03f1d0cc278ab02403048b3de12987434bbe8bc8 100644 (file)
@@ -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'))