check for the x bit when locating an executable
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 5 Jan 2012 09:10:13 +0000 (10:10 +0100)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 5 Jan 2012 09:10:13 +0000 (10:10 +0100)
sface/sfiprocess.py

index 35f0ca9..f8dc206 100644 (file)
@@ -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