Commit 99615244 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[schema] Print the JSON content on decoding error

parent 459b3393
......@@ -94,7 +94,11 @@ def load_schema(schema_name, version=1):
with open(fname, "rb") as f:
data =
schema = json.loads(data)
schema = json.loads(data)
except json.errors.JSONDecodeError:
print("Invalid json:\n {data}".format(data))
basedir = os.path.realpath(os.path.dirname(fname))
resolver = jsonschema.RefResolver("file://" + basedir + "/", schema)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment