File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change 24
24
if sys .version_info >= (3 , 4 ):
25
25
from importlib .machinery import PathFinder
26
26
27
+ PYTHON_SUBDIR = 'python3'
28
+ else :
29
+ PYTHON_SUBDIR = 'python2'
30
+
27
31
28
32
@plugin
29
33
class ScriptHost (object ):
@@ -236,16 +240,11 @@ def hook(path):
236
240
237
241
def discover_runtime_directories (nvim ):
238
242
rv = []
239
- for path in nvim .list_runtime_paths ():
240
- if not os .path .exists (path ):
243
+ for rtp in nvim .list_runtime_paths ():
244
+ if not os .path .exists (rtp ):
241
245
continue
242
- path1 = os .path .join (path , 'pythonx' )
243
- if IS_PYTHON3 :
244
- path2 = os .path .join (path , 'python3' )
245
- else :
246
- path2 = os .path .join (path , 'python2' )
247
- if os .path .exists (path1 ):
248
- rv .append (path1 )
249
- if os .path .exists (path2 ):
250
- rv .append (path2 )
246
+ for subdir in ['pythonx' , PYTHON_SUBDIR ]:
247
+ path = os .path .join (rtp , subdir )
248
+ if os .path .exists (path ):
249
+ rv .append (path )
251
250
return rv
You can’t perform that action at this time.
0 commit comments