From b70515fcce03bfd525b14604d1d4dd53224025c8 Mon Sep 17 00:00:00 2001 From: Erez Katz Date: Wed, 7 Dec 2016 18:12:30 +0200 Subject: [PATCH] Update parser.py to get the full url it is actually required to do urlparse(path).netloc + urparse(path).path --- thriftpy/parser/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thriftpy/parser/parser.py b/thriftpy/parser/parser.py index 4ca99bdb..f65320af 100644 --- a/thriftpy/parser/parser.py +++ b/thriftpy/parser/parser.py @@ -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: