mirror of
https://git.yoctoproject.org/poky
synced 2026-04-26 00:32:12 +02:00
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:
committed by
Richard Purdie
parent
37c9adaf80
commit
717a427807
@@ -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'))
|
||||
|
||||
Reference in New Issue
Block a user