summaryrefslogtreecommitdiff
path: root/scipy_distutils/exec_command.py
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2004-04-09 16:33:47 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2004-04-09 16:33:47 +0000
commit468a2f286f3a86c984ebfe8d6b81c7ac26de5135 (patch)
tree18c01b0390c344c2236f0dd230938a3d6f15d06e /scipy_distutils/exec_command.py
parented27d887320f710f0af499fba1f141e1f06e1e6c (diff)
downloadnumpy-468a2f286f3a86c984ebfe8d6b81c7ac26de5135.tar.gz
Return original exe name when not found.
Diffstat (limited to 'scipy_distutils/exec_command.py')
-rw-r--r--scipy_distutils/exec_command.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scipy_distutils/exec_command.py b/scipy_distutils/exec_command.py
index bd4d73d96..f172b2a74 100644
--- a/scipy_distutils/exec_command.py
+++ b/scipy_distutils/exec_command.py
@@ -123,6 +123,7 @@ def find_executable(exe, path=None):
""" Return full path of a executable.
"""
log.debug('find_executable(%r)' % exe)
+ orig_exe = exe
if path is None:
path = os.environ.get('PATH',os.defpath)
if os.name=='posix':
@@ -160,7 +161,8 @@ def find_executable(exe, path=None):
return f_ext
exe = realpath(exe)
if not os.path.isfile(exe) or os.access(exe,os.X_OK):
- log.warn('Could not locate executable %s' % exe)
+ log.warn('Could not locate executable %s' % orig_exe)
+ return orig_exe
return exe
############################################################