Skip to content

Commit

Permalink
Don't assume the type of ref
Browse files Browse the repository at this point in the history
Only convert to file:/// Uri if it's a a string
  • Loading branch information
psafont committed Dec 21, 2016
1 parent f302f5f commit da751f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion schema_salad/ref_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ def resolve_ref(self,
mixin = None # type: Dict[unicode, Any]

if not base_url:
ref = pathlib.Path(os.path.join(os.getcwd(), ref)).as_uri()
if isinstance(ref, unicode):
ref = pathlib.Path(os.path.join(os.getcwd(), ref)).as_uri()
base_url = pathlib.Path(os.getcwd()).as_uri() + '/'

sl = SourceLine(obj, None, ValueError)
Expand Down

0 comments on commit da751f7

Please sign in to comment.