mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Fix read mode for pyc files
Now all test should pass on travis.
This commit is contained in:
@@ -31,7 +31,8 @@ def find_module_py33(string, path=None):
|
||||
module_file = None
|
||||
else:
|
||||
module_path = loader.get_filename(string)
|
||||
module_file = open(module_path)
|
||||
mode = 'rb' if module_path.endswith(".pyc") else 'r'
|
||||
module_file = open(module_path, mode)
|
||||
except AttributeError:
|
||||
# ExtensionLoader has not attribute get_filename, instead it has a
|
||||
# path attribute that we can use to retrieve the module path
|
||||
|
||||
Reference in New Issue
Block a user