]> granicus.if.org Git - python/commitdiff
#11490: EACCES can also mean command not found
authorR David Murray <rdmurray@bitdance.com>
Mon, 14 Mar 2011 02:13:09 +0000 (22:13 -0400)
committerR David Murray <rdmurray@bitdance.com>
Mon, 14 Mar 2011 02:13:09 +0000 (22:13 -0400)
Lib/test/test_subprocess.py
Misc/NEWS

index ce3e0c232b386ba13ebe0d5e59d4ef508abfa215..d7db802576c351467f0abc0b96f1857e5ee1fc58 100644 (file)
@@ -554,7 +554,8 @@ class ProcessTestCase(BaseTestCase):
                                  stderr=subprocess.PIPE)
             # Windows raises IOError
             except (IOError, OSError) as err:
-                if err.errno != errno.ENOENT:  # ignore "no such file"
+                # ignore errors that indicate the command was not found
+                if err.errno not in (errno.ENOENT, errno.EACCES): 
                     raise
 
     def test_issue8780(self):
index df2aa4beeb80db23b5af50b77d722d6586417859..2b099783dbaf0ab8d0e5ffe9d890efa9ba3e0814 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -221,6 +221,9 @@ Build
 Tests
 -----
 
+- Issue #11490: test_subprocess:test_leaking_fds_on_error no longer gives a
+  false positive if the last directory in the path is inaccessible.
+
 - Issue #10822: Fix test_posix:test_getgroups failure under Solaris.  Patch
   by Ross Lagerwall.