fix linting

This commit is contained in:
Robert Kaussow 2024-03-07 11:32:09 +01:00
parent 10f9f8acb3
commit 195d370774
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
1 changed files with 2 additions and 5 deletions

View File

@ -285,11 +285,8 @@ class Config:
try:
anyconfig.validate(config, self.schema, ac_schema_safe=False)
except jsonschema.exceptions.ValidationError as e:
schema_error = "Failed validating '{validator}' in schema{schema}\n{message}".format(
validator=e.validator,
schema=format_as_index(list(e.relative_schema_path)[:-1], 0),
message=e.message,
)
schema = format_as_index(list(e.relative_schema_path)[:-1], 0)
schema_error = f"Failed validating '{e.validator}' in schema {schema}\n{e.message}"
raise prometheuspvesd.exception.ConfigError("Configuration error", schema_error) from e
return True