diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2024-06-10 15:41:50 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-06-12 16:16:03 +0100 |
commit | 717a427807335825e0ae40a0684fc2a0b6bd9fcc (patch) | |
tree | 13babcdb1fbab1e876e85fc31dcab000d52d314d /meta/classes | |
parent | 37c9adaf80c82e52dd6807a1d278826b4a99435d (diff) | |
download | poky-717a427807335825e0ae40a0684fc2a0b6bd9fcc.tar.gz |
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>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/spdx-common.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/spdx-common.bbclass b/meta/classes/spdx-common.bbclass index f6fc182838..03f1d0cc27 100644 --- a/meta/classes/spdx-common.bbclass +++ b/meta/classes/spdx-common.bbclass | |||
@@ -58,7 +58,7 @@ def extract_licenses(filename): | |||
58 | return ascii_licenses | 58 | return ascii_licenses |
59 | except Exception as e: | 59 | except Exception as e: |
60 | bb.warn(f"Exception reading {filename}: {e}") | 60 | bb.warn(f"Exception reading {filename}: {e}") |
61 | return None | 61 | return [] |
62 | 62 | ||
63 | def is_work_shared_spdx(d): | 63 | def is_work_shared_spdx(d): |
64 | return bb.data.inherits_class('kernel', d) or ('work-shared' in d.getVar('WORKDIR')) | 64 | return bb.data.inherits_class('kernel', d) or ('work-shared' in d.getVar('WORKDIR')) |