1
0
forked from VimPlug/jedi

Merge pull request #387 from ColinDuquesnoy/py34

UnicodeError with Python 3.4
This commit is contained in:
Dave Halter
2014-03-21 18:42:21 +04:30
3 changed files with 10 additions and 2 deletions

View File

@@ -31,7 +31,8 @@ def find_module_py33(string, path=None):
module_file = None
else:
module_path = loader.get_filename(string)
mode = 'rb' if module_path.endswith(".pyc") else 'r'
module_ext = os.path.splitext(module_path)[1]
mode = 'rb' if module_ext in ['.pyc', '.so', '.pyd'] else 'r'
module_file = open(module_path, mode)
except AttributeError:
# ExtensionLoader has not attribute get_filename, instead it has a