From 717a427807335825e0ae40a0684fc2a0b6bd9fcc Mon Sep 17 00:00:00 2001 From: Joshua Watt Date: Mon, 10 Jun 2024 15:41:50 -0600 Subject: 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 Signed-off-by: Richard Purdie --- meta/classes/spdx-common.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta/classes') 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): 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')) -- cgit v1.2.3-54-g00ecf