avoid listing non-existing path in PATH.
This commit is contained in:
parent
da698b29a6
commit
4a132275cb
1 changed files with 2 additions and 0 deletions
|
@ -11,6 +11,8 @@ def resolve_cython():
|
||||||
global cython
|
global cython
|
||||||
for executable in ('cython', 'cython-2.7'):
|
for executable in ('cython', 'cython-2.7'):
|
||||||
for path in os.environ['PATH'].split(':'):
|
for path in os.environ['PATH'].split(':'):
|
||||||
|
if not os.path.exists(path):
|
||||||
|
continue
|
||||||
if executable in os.listdir(path):
|
if executable in os.listdir(path):
|
||||||
cython = os.path.join(path, executable)
|
cython = os.path.join(path, executable)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue