Skip to content

Commit da751f7

Browse files
committed
Don't assume the type of ref
Only convert to file:/// Uri if it's a a string
1 parent f302f5f commit da751f7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

schema_salad/ref_resolver.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,8 @@ def resolve_ref(self,
380380
mixin = None # type: Dict[unicode, Any]
381381

382382
if not base_url:
383-
ref = pathlib.Path(os.path.join(os.getcwd(), ref)).as_uri()
383+
if isinstance(ref, unicode):
384+
ref = pathlib.Path(os.path.join(os.getcwd(), ref)).as_uri()
384385
base_url = pathlib.Path(os.getcwd()).as_uri() + '/'
385386

386387
sl = SourceLine(obj, None, ValueError)

0 commit comments

Comments
 (0)