diff options
author | Benedikt Hegner <hegner@cern.ch> | 2016-05-11 13:29:27 +0200 |
---|---|---|
committer | Benedikt Hegner <hegner@cern.ch> | 2016-05-11 13:29:27 +0200 |
commit | 0b7b25487f326b1ff6e0d04b41e1753398262b58 (patch) | |
tree | 9735988d6947dc4e274c73600134df48b953b14b /lib | |
parent | 3d3a520a7d79f40f167f2856c5787ef94739eedc (diff) | |
download | spack-0b7b25487f326b1ff6e0d04b41e1753398262b58.tar.gz spack-0b7b25487f326b1ff6e0d04b41e1753398262b58.tar.bz2 spack-0b7b25487f326b1ff6e0d04b41e1753398262b58.tar.xz spack-0b7b25487f326b1ff6e0d04b41e1753398262b58.zip |
improve error message for wrong config section names
Diffstat (limited to 'lib')
-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): |