From: Joshua Watt Date: Mon, 10 Jun 2024 21:41:50 +0000 (-0600) Subject: classes/spdx-common: Return empty list from extract_licenses X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e200aa9cc6ceb8ca58ef239a1a5565287b38ce55;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Joshua Watt Signed-off-by: Richard Purdie --- diff --git a/meta/classes/spdx-common.bbclass b/meta/classes/spdx-common.bbclass index f6fc182838d..03f1d0cc278 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'))