mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-16 21:44:56 +08:00
Fix a small issue in the import logic that caused tests to fail.
This commit is contained in:
@@ -383,10 +383,13 @@ class _Importer(object):
|
|||||||
p = os.path.join(path, '__init__' + suffix)
|
p = os.path.join(path, '__init__' + suffix)
|
||||||
if os.path.exists(p):
|
if os.path.exists(p):
|
||||||
if suffix == '.py':
|
if suffix == '.py':
|
||||||
with open(path, 'rb') as f:
|
with open(p, 'rb') as f:
|
||||||
source = f.read()
|
source = f.read()
|
||||||
|
path = p
|
||||||
else: # It's a binary!
|
else: # It's a binary!
|
||||||
source = None
|
source = None
|
||||||
|
break
|
||||||
|
|
||||||
else:
|
else:
|
||||||
source = current_namespace[0].read()
|
source = current_namespace[0].read()
|
||||||
current_namespace[0].close()
|
current_namespace[0].close()
|
||||||
|
|||||||
Reference in New Issue
Block a user