spec.py: ensure spec.extra_attributes is {} if is null in json (#48896)

This commit is contained in:
Harmen Stoppels 2025-02-05 17:55:53 +01:00 committed by Harmen Stoppels
parent 4f80f07b9a
commit f32a74491e

View File

@ -4861,8 +4861,8 @@ def from_node_dict(cls, node):
spec.external_modules = node["external"]["module"] spec.external_modules = node["external"]["module"]
if spec.external_modules is False: if spec.external_modules is False:
spec.external_modules = None spec.external_modules = None
spec.extra_attributes = node["external"].get( spec.extra_attributes = (
"extra_attributes", syaml.syaml_dict() node["external"].get("extra_attributes") or syaml.syaml_dict()
) )
# specs read in are concrete unless marked abstract # specs read in are concrete unless marked abstract