Merge pull request #936 from hegner/bugfix/configsections
Improve error message for wrong config section names
This commit is contained in:
commit
eaf046c6a4
@ -269,10 +269,10 @@
|
||||
|
||||
|
||||
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):
|
||||
|
Loading…
Reference in New Issue
Block a user