From 406480a586086acbe3d1dc5c57fc44156d7fb951 Mon Sep 17 00:00:00 2001 From: andrewjpage Date: Wed, 3 Oct 2012 15:50:00 +0100 Subject: [PATCH] split off input parameters when testing if exec is in path --- run_gubbins.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/run_gubbins.py b/run_gubbins.py index 7b3fe075..2085df43 100755 --- a/run_gubbins.py +++ b/run_gubbins.py @@ -268,6 +268,8 @@ def delete_files_based_on_list_of_regexes(directory_to_search, regex_for_file_de os.remove(full_path_of_file_for_deletion) def which(program): + executable = program.split(" ") + program = executable[0] def is_exe(fpath): return os.path.isfile(fpath) and os.access(fpath, os.X_OK) fpath, fname = os.path.split(program) @@ -279,7 +281,7 @@ def is_exe(fpath): exe_file = os.path.join(path, program) if is_exe(exe_file): return exe_file - + return None