]> granicus.if.org Git - python/commitdiff
real test for executable script
authorGuido van Rossum <guido@python.org>
Thu, 25 Jan 1996 18:23:50 +0000 (18:23 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 25 Jan 1996 18:23:50 +0000 (18:23 +0000)
Lib/CGIHTTPServer.py

index bcb2ef4b2faf8e3689084e3a00a17e923a78f5df..837f7c2ea6bc78dce1199269819a29ed77db2de7 100644 (file)
@@ -186,7 +186,7 @@ def executable(path):
        st = os.stat(path)
     except os.error:
        return 0
-    return 1
+    return st[0] & 0111 != 0
 
 
 def test(HandlerClass = CGIHTTPRequestHandler,