diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 8f8b445a1e8..ff1fbb4d072 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -4902,7 +4902,7 @@ 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", {}) + spec.extra_attributes = node["external"].get("extra_attributes") or {} # specs read in are concrete unless marked abstract if node.get("concrete", True):