[Python-checkins] cpython (3.5): Issue #25717: Add comment explaining why errors are ignored

martin.panter python-checkins at python.org
Sun Dec 6 06:20:32 EST 2015


https://hg.python.org/cpython/rev/e9bf5803b716
changeset:   99477:e9bf5803b716
branch:      3.5
parent:      99474:02d2127fda6c
user:        Martin Panter <vadmium+py at gmail.com>
date:        Sun Dec 06 11:12:15 2015 +0000
summary:
  Issue #25717: Add comment explaining why errors are ignored

files:
  Modules/_io/fileio.c |  3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)


diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c
--- a/Modules/_io/fileio.c
+++ b/Modules/_io/fileio.c
@@ -443,6 +443,9 @@
     fstat_result = _Py_fstat_noraise(self->fd, &fdfstat);
     Py_END_ALLOW_THREADS
     if (fstat_result < 0) {
+        /* Tolerate fstat() errors other than EBADF.  See Issue #25717, where
+        an anonymous file on a Virtual Box shared folder filesystem would
+        raise ENOENT. */
 #ifdef MS_WINDOWS
         if (GetLastError() == ERROR_INVALID_HANDLE) {
             PyErr_SetFromWindowsErr(0);

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


More information about the Python-checkins mailing list