1
0
forked from VimPlug/jedi

Update __init__.py

fix the source file read mode issue.
if use 'r' mode, this may raise a `UnicodeDecodeError`.
This commit is contained in:
cologler
2016-11-09 07:48:45 +08:00
committed by GitHub
parent 5ef874796a
commit a51475d265

View File

@@ -105,7 +105,7 @@ class Script(object):
if source is None:
# TODO add a better warning than the traceback!
with open(path) as f:
with open(path, 'rb') as f:
source = f.read()
self._source = common.source_to_unicode(source, encoding)