From f32a74491e272a5c1a3e462b6915a13a7f54943c Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 5 Feb 2025 17:55:53 +0100 Subject: [PATCH] spec.py: ensure spec.extra_attributes is {} if is null in json (#48896) --- lib/spack/spack/spec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 15eef1a748d..9d1027dd0bb 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -4861,8 +4861,8 @@ def from_node_dict(cls, node): spec.external_modules = node["external"]["module"] if spec.external_modules is False: spec.external_modules = None - spec.extra_attributes = node["external"].get( - "extra_attributes", syaml.syaml_dict() + spec.extra_attributes = ( + node["external"].get("extra_attributes") or syaml.syaml_dict() ) # specs read in are concrete unless marked abstract