modules:prefix_inspections: allow empty dict (#40485)

Currently

```
modules:
  prefix_inspections:: {}
```

gives you the builtin defaults instead of no mapping.
This commit is contained in:
Harmen Stoppels 2023-10-12 18:28:16 +02:00 committed by GitHub
parent 265432f7b7
commit 64ef33767f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,8 +26,8 @@ def prefix_inspections(platform):
A dictionary mapping subdirectory names to lists of environment
variables to modify with that directory if it exists.
"""
inspections = spack.config.get("modules:prefix_inspections", {})
if inspections:
inspections = spack.config.get("modules:prefix_inspections")
if isinstance(inspections, dict):
return inspections
inspections = {