From 521b3b6b54766deff63034a508267d37a4bdc611 Mon Sep 17 00:00:00 2001
From: Sikim Chakraborty <szlfc07@gmail.com>
Date: Thu, 1 Mar 2018 14:16:32 +0530
Subject: [PATCH] Update parser.py

---
 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 26c6073..8c2bf75 100644
--- a/thriftpy/parser/parser.py
+++ b/thriftpy/parser/parser.py
@@ -544,7 +544,7 @@ def parse(path, module_name=None, include_dirs=None, include_dir=None,
     if url_scheme == 'file':
         with open(urlparse(path).netloc + urlparse(path).path) as fh:
             data = fh.read()
-    elif url_scheme == '':
+    elif url_scheme == '' or os.path.exists(path):
         with open(path) as fh:
             data = fh.read()
     elif url_scheme in ('http', 'https'):