summaryrefslogtreecommitdiff
path: root/numpy/distutils/exec_command.py
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2007-07-24 12:08:46 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2007-07-24 12:08:46 +0000
commit19713cf2a650d9ffa910ebeb5f15e8b24e7125ae (patch)
tree09cef8a02a77276b7c73fc06893d18b1d98f1eb6 /numpy/distutils/exec_command.py
parenteb12ad4a3656aafe1260e0a981bd5c0dc136de0c (diff)
downloadnumpy-19713cf2a650d9ffa910ebeb5f15e8b24e7125ae.tar.gz
Diffstat (limited to 'numpy/distutils/exec_command.py')
-rw-r--r--numpy/distutils/exec_command.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/numpy/distutils/exec_command.py b/numpy/distutils/exec_command.py
index 7b5d5edb4..1ec7aaaa1 100644
--- a/numpy/distutils/exec_command.py
+++ b/numpy/distutils/exec_command.py
@@ -123,7 +123,7 @@ def test_splitcmdline():
############################################################
def find_executable(exe, path=None):
- """Return full path of a executable.
+ """Return full path of a executable or None.
Symbolic links are not followed.
"""
@@ -358,7 +358,6 @@ def _exec_command( command, use_shell=None, use_tee = None, **env ):
use_shell = os.name=='posix'
if use_tee is None:
use_tee = os.name=='posix'
-
using_command = 0
if use_shell:
# We use shell (unless use_shell==0) so that wildcards can be
@@ -380,7 +379,7 @@ def _exec_command( command, use_shell=None, use_tee = None, **env ):
spawn_command = os.spawnvpe
else:
spawn_command = os.spawnve
- argv[0] = find_executable(argv[0])
+ argv[0] = find_executable(argv[0]) or argv[0]
if not os.path.isfile(argv[0]):
log.warn('Executable %s does not exist' % (argv[0]))
if os.name in ['nt','dos']: