Skip to content

Commit fbe4c6e

Browse files
committed
Properly fail python-jsonschema if needed
1 parent 11f5a1a commit fbe4c6e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

implementations/python-jsonschema/validate.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
compile_end = time.time_ns()
1818

1919
start = time.time_ns()
20+
valid = True
2021
for instance in instances:
21-
validator.is_valid(instance)
22+
valid = valid and validator.is_valid(instance)
2223
end = time.time_ns()
2324

2425
print((end - start), ",", (compile_end - compile_start), sep='')
26+
sys.exit(0 if valid else 1)

0 commit comments

Comments
 (0)