Skip to content

Commit

Permalink
Add more verbose output to schema validator
Browse files Browse the repository at this point in the history
Signed-off-by: Milosz Wasilewski <[email protected]>
  • Loading branch information
mwasilew committed Jan 24, 2025
1 parent fcf0724 commit d48195a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion schemacheck.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import sys
import yaml
import voluptuous
from lava_common.schemas import validate

exitcode = 0
Expand All @@ -15,8 +16,9 @@
y = yaml.safe_load(f)
f.close()
validate(y)
except:
except voluptuous.Invalid as exc:
print(f"{filename} is invalid")
print(exc.msg)
exitcode += 1
print(f"{filename} is valid")
sys.exit(exitcode)
Expand Down

0 comments on commit d48195a

Please sign in to comment.