mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
@@ -33,10 +33,16 @@ def find_module_py33(string, path=None):
|
|||||||
module_path = loader.get_filename(string)
|
module_path = loader.get_filename(string)
|
||||||
module_file = open(module_path)
|
module_file = open(module_path)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
# is builtin module
|
# ExtensionLoader has not attribute get_filename, instead it has a
|
||||||
module_path = string
|
# path attribute that we can use to retrieve the module path
|
||||||
module_file = None
|
try:
|
||||||
is_package = False
|
module_path = loader.path
|
||||||
|
module_file = open(loader.path, 'rb')
|
||||||
|
except AttributeError:
|
||||||
|
module_path = string
|
||||||
|
module_file = None
|
||||||
|
finally:
|
||||||
|
is_package = False
|
||||||
|
|
||||||
return module_file, module_path, is_package
|
return module_file, module_path, is_package
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user