changeset: 99477:e9bf5803b716 branch: 3.5 parent: 99474:02d2127fda6c user: Martin Panter date: Sun Dec 06 11:12:15 2015 +0000 files: Modules/_io/fileio.c description: Issue #25717: Add comment explaining why errors are ignored diff -r 02d2127fda6c -r e9bf5803b716 Modules/_io/fileio.c --- a/Modules/_io/fileio.c Sat Dec 05 23:55:33 2015 -0500 +++ b/Modules/_io/fileio.c Sun Dec 06 11:12:15 2015 +0000 @@ -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);