From: Thierry Parmentelat Date: Thu, 5 Jan 2012 09:10:13 +0000 (+0100) Subject: check for the x bit when locating an executable X-Git-Tag: sface-0.9-2~1 X-Git-Url: http://git.onelab.eu/?p=sface.git;a=commitdiff_plain;h=81bcf92e5a2aa133bba83df3f0de69af7ebcea20 check for the x bit when locating an executable --- diff --git a/sface/sfiprocess.py b/sface/sfiprocess.py index 35f0ca9..f8dc206 100644 --- a/sface/sfiprocess.py +++ b/sface/sfiprocess.py @@ -13,7 +13,7 @@ def find_executable(exec_name): paths = os.getenv("PATH").split(':') for p in paths: exec_path = os.path.join(p, exec_name) - if os.path.exists(exec_path): + if os.path.exists(exec_path) and os.access(exec_path,os.X_OK): return exec_path return None