diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-05-11 08:58:33 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-05-11 08:58:33 -0700 |
commit | eaf046c6a426f9426a7a1034a4f9acc80dea8123 (patch) | |
tree | 9735988d6947dc4e274c73600134df48b953b14b | |
parent | 3d3a520a7d79f40f167f2856c5787ef94739eedc (diff) | |
parent | 0b7b25487f326b1ff6e0d04b41e1753398262b58 (diff) | |
download | spack-eaf046c6a426f9426a7a1034a4f9acc80dea8123.tar.gz spack-eaf046c6a426f9426a7a1034a4f9acc80dea8123.tar.bz2 spack-eaf046c6a426f9426a7a1034a4f9acc80dea8123.tar.xz spack-eaf046c6a426f9426a7a1034a4f9acc80dea8123.zip |
Merge pull request #936 from hegner/bugfix/configsections
Improve error message for wrong config section names
-rw-r--r-- | lib/spack/spack/config.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 21e08ff666..9488e49ab9 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -269,10 +269,10 @@ config_scopes = OrderedDict() def validate_section_name(section): - """Raise a ValueError if the section is not a valid section.""" + """Exit if the section is not a valid section.""" if section not in section_schemas: - raise ValueError("Invalid config section: '%s'. Options are %s" - % (section, section_schemas)) + tty.die("Invalid config section: '%s'. Options are: %s" + % (section, " ".join(section_schemas.keys()))) def extend_with_default(validator_class): |