File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -635,8 +635,8 @@ def find_schema(schema_dir, name):
635635 """Search the `schema_dir` directory for a schema called `name`.json.
636636 Return the file path of the first match it finds.
637637 """
638- if name in _SCHEMAS_FOUND :
639- return _SCHEMAS_FOUND [name ]
638+ if schema_dir in _SCHEMAS_FOUND and name in _SCHEMAS_FOUND [ schema_dir ] :
639+ return _SCHEMAS_FOUND [schema_dir ][ name ]
640640
641641 schema_filename = name + '.json'
642642
@@ -645,7 +645,9 @@ def find_schema(schema_dir, name):
645645 continue
646646 if schema_filename in filenames :
647647 schema_path = os .path .join (root , schema_filename )
648- _SCHEMAS_FOUND [name ] = schema_path
648+ if schema_dir not in _SCHEMAS_FOUND :
649+ _SCHEMAS_FOUND [schema_dir ] = dict ()
650+ _SCHEMAS_FOUND [schema_dir ][name ] = schema_path
649651 return schema_path
650652
651653
You can’t perform that action at this time.
0 commit comments