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

Commit

Permalink
Merge pull request #270 from ErKatz/patch-1
Browse files Browse the repository at this point in the history
Update parser.py
  • Loading branch information
hit9 committed Dec 6, 2016
2 parents 013e42b + 1230f44 commit 4be026a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion thriftpy/parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,10 @@ def parse(path, module_name=None, include_dirs=None, include_dir=None,
raise ThriftParserError('Path should end with .thrift')

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

0 comments on commit 4be026a

Please sign in to comment.