classes/spdx-common: Return empty list from extract_licenses

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.

(From OE-Core rev: e200aa9cc6ceb8ca58ef239a1a5565287b38ce55)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Watt
2024-06-10 15:41:50 -06:00
committed by Richard Purdie
parent 37c9adaf80
commit 717a427807

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