File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -227,8 +227,10 @@ def __init__(self, module):
227
227
228
228
def load_module (self , fullname , path = None ):
229
229
# Check sys.modules, required for reload (see PEP302).
230
- if fullname in sys . modules :
230
+ try :
231
231
return sys .modules [fullname ]
232
+ except KeyError :
233
+ pass
232
234
return imp .load_module (fullname , * self .module )
233
235
234
236
class VimPathFinder (object ):
@@ -242,9 +244,9 @@ def find_module(fullname, path=None):
242
244
return None
243
245
244
246
@staticmethod
245
- def find_spec (fullname , path = None , target = None ):
247
+ def find_spec (fullname , target = None ):
246
248
"""Method for Python 3.4+."""
247
- return PathFinder .find_spec (fullname , path or _get_paths (), target )
249
+ return PathFinder .find_spec (fullname , _get_paths (), target )
248
250
249
251
def hook (path ):
250
252
if path == nvim .VIM_SPECIAL_PATH :
You can’t perform that action at this time.
0 commit comments