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 <lukaszx.mrugala@intel.com>
This commit is contained in:
Lukasz Mrugala 2023-10-05 13:41:15 +02:00 committed by Johan Hedberg
parent 493fe169a8
commit 2fcf4e3499

View file

@ -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):