Merge "Issue with loading yaml files after requirements change"
This commit is contained in:
commit
45c0d26d9d
@ -47,9 +47,8 @@ def _validate_yaml(schema, config):
|
|||||||
:param schema: The schema to validate with (browbeat, perfkit, rally...)
|
:param schema: The schema to validate with (browbeat, perfkit, rally...)
|
||||||
:param config: Loaded yaml to validate
|
:param config: Loaded yaml to validate
|
||||||
"""
|
"""
|
||||||
with open("{}/{}.yml".format(conf_schema_path, schema), "r") as schema_file:
|
check = pykwalify_core.Core(
|
||||||
schema = yaml.safe_load(schema_file)
|
source_data=config, schema_files=["{}/{}.yml".format(conf_schema_path, schema)])
|
||||||
check = pykwalify_core.Core(source_data=config, schema_data=schema)
|
|
||||||
try:
|
try:
|
||||||
check.validate(raise_exception=True)
|
check.validate(raise_exception=True)
|
||||||
except pykwalify_errors.SchemaError as e:
|
except pykwalify_errors.SchemaError as e:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user