From 2fcf4e34991a31f79037c8bc4c208657ddedc67c Mon Sep 17 00:00:00 2001 From: Lukasz Mrugala Date: Thu, 5 Oct 2023 13:41:15 +0200 Subject: [PATCH] scripts: pylib: build_helpers: flash_order fix If flash_order were to be missing from the YAML, the Domains init would crash instead of substituting an empty list. This commit fixes that. Signed-off-by: Lukasz Mrugala --- scripts/pylib/build_helpers/domains.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pylib/build_helpers/domains.py b/scripts/pylib/build_helpers/domains.py index 978569d9547..760217cc282 100644 --- a/scripts/pylib/build_helpers/domains.py +++ b/scripts/pylib/build_helpers/domains.py @@ -78,7 +78,7 @@ class Domains: # Now that self._domains has been initialized, we can leverage # the common checks in self.get_domain to verify this. self._default_domain = self.get_domain(data['default']) - self._flash_order = self.get_domains(data['flash_order'] or []) + self._flash_order = self.get_domains(data.get('flash_order', [])) @staticmethod def from_file(domains_file):