[Python-checkins] cpython (3.1): #11490: EACCES can also mean command not found

r.david.murray python-checkins at python.org
Mon Mar 14 03:50:24 CET 2011


http://hg.python.org/cpython/rev/2b75ac7c9c12
changeset:   68432:2b75ac7c9c12
branch:      3.1
parent:      68423:539e6f1fce78
user:        R David Murray <rdmurray at bitdance.com>
date:        Sun Mar 13 22:13:09 2011 -0400
summary:
  #11490: EACCES can also mean command not found

files:
  Lib/test/test_subprocess.py
  Misc/NEWS

diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -554,7 +554,8 @@
                                  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):
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -221,6 +221,9 @@
 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.
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list