Skip to content
Snippets Groups Projects
Commit eaf046c6 authored by Todd Gamblin's avatar Todd Gamblin
Browse files

Merge pull request #936 from hegner/bugfix/configsections

Improve error message for wrong config section names
parents 3d3a520a 0b7b2548
Branches
Tags
No related merge requests found
...@@ -269,10 +269,10 @@ ...@@ -269,10 +269,10 @@
def validate_section_name(section): 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: if section not in section_schemas:
raise ValueError("Invalid config section: '%s'. Options are %s" tty.die("Invalid config section: '%s'. Options are: %s"
% (section, section_schemas)) % (section, " ".join(section_schemas.keys())))
def extend_with_default(validator_class): def extend_with_default(validator_class):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment