Skip to content
Snippets Groups Projects
Commit 0b7b2548 authored by Benedikt Hegner's avatar Benedikt Hegner
Browse files

improve error message for wrong config section names

parent 3d3a520a
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment