Skip to content

Commit 0960222

Browse files
author
Peter Amstutz
committed
Fix schema loading from resources
1 parent 95cfbe1 commit 0960222

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

schema_salad/schema.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,15 @@ def get_metaschema():
127127
})
128128

129129
for f in salad_files:
130-
rs = resource_stream(__name__, 'metaschema/' + f):
130+
rs = resource_stream(__name__, 'metaschema/' + f)
131131
loader.cache["https://w3id.org/cwl/" + f] = rs.read()
132132
rs.close()
133133

134-
j = yaml.load(loader.cache["https://w3id.org/cwl/metaschema.yml"])
134+
rs = resource_stream(__name__, 'metaschema/metaschema.yml')
135+
loader.cache["https://w3id.org/cwl/salad"] = rs.read()
136+
rs.close()
137+
138+
j = yaml.load(loader.cache["https://w3id.org/cwl/salad"])
135139
j, _ = loader.resolve_all(j, "https://w3id.org/cwl/salad#")
136140

137141
#pprint.pprint(j)

0 commit comments

Comments
 (0)