Skip to content

Commit

Permalink
Update parser.py
Browse files Browse the repository at this point in the history
to get the full url it is actually required to do urlparse(path).netloc + urparse(path).path
  • Loading branch information
ErKatz authored Dec 7, 2016
1 parent 4be026a commit b70515f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thriftpy/parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def parse(path, module_name=None, include_dirs=None, include_dir=None,

url_scheme = urlparse(path).scheme
if url_scheme == 'file':
with open(urlparse(path).netloc) as fh:
with open(urlparse(path).netloc + urlparse(path).path) as fh:
data = fh.read()
elif url_scheme == '':
with open(path) as fh:
Expand Down

0 comments on commit b70515f

Please sign in to comment.