File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -123,15 +123,18 @@ def getexecutable(name, cache={}):
123
123
except KeyError :
124
124
executable = py .path .local .sysfind (name )
125
125
if executable :
126
+ import subprocess
127
+ popen = subprocess .Popen ([str (executable ), "--version" ],
128
+ universal_newlines = True , stderr = subprocess .PIPE )
129
+ out , err = popen .communicate ()
126
130
if name == "jython" :
127
- import subprocess
128
- popen = subprocess .Popen ([str (executable ), "--version" ],
129
- universal_newlines = True , stderr = subprocess .PIPE )
130
- out , err = popen .communicate ()
131
131
if not err or "2.5" not in err :
132
132
executable = None
133
133
if "2.5.2" in err :
134
134
executable = None # http://bugs.jython.org/issue1790
135
+ elif popen .returncode != 0 :
136
+ # Handle pyenv's 127.
137
+ executable = None
135
138
cache [name ] = executable
136
139
return executable
137
140
You can’t perform that action at this time.
0 commit comments