1
0
mirror of https://github.com/gsi-upm/senpy synced 2025-09-17 20:12:22 +00:00

Better makefile

This commit is contained in:
J. Fernando Sánchez
2016-12-14 14:38:58 +01:00
parent 2e7530d9bc
commit 4dee623ef9
2 changed files with 12 additions and 3 deletions

View File

@@ -32,7 +32,9 @@ def get_schema_path(schema_file, absolute=False):
def read_schema(schema_file, absolute=False):
schema_path = get_schema_path(schema_file, absolute)
schema_uri = 'file://{}'.format(schema_path)
return jsonref.load(open(schema_path), base_uri=schema_uri)
with open(schema_path) as f:
return jsonref.load(f, base_uri=schema_uri)
base_schema = read_schema(DEFINITIONS_FILE)