Skip to content
This repository was archived by the owner on Dec 10, 2018. It is now read-only.

Commit b70515f

Browse files
authored
Update parser.py
to get the full url it is actually required to do urlparse(path).netloc + urparse(path).path
1 parent 4be026a commit b70515f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

thriftpy/parser/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ def parse(path, module_name=None, include_dirs=None, include_dir=None,
537537

538538
url_scheme = urlparse(path).scheme
539539
if url_scheme == 'file':
540-
with open(urlparse(path).netloc) as fh:
540+
with open(urlparse(path).netloc + urlparse(path).path) as fh:
541541
data = fh.read()
542542
elif url_scheme == '':
543543
with open(path) as fh:

0 commit comments

Comments
 (0)