diff options
author | Martin Panter <vadmium+py@gmail.com> | 2015-12-06 11:19:31 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2015-12-06 11:19:31 (GMT) |
commit | c68e723e6f8bd9923d23a4f14b66504b192aba74 (patch) | |
tree | cb99e694777c559875a2cb88e8103872fc7d468f /Modules/_io | |
parent | 7da28d29d6bd4d4e098956fc6940779aae015274 (diff) | |
parent | 49d3db92a4c3d9ddfa1babf82c9b20383725a24d (diff) | |
download | cpython-c68e723e6f8bd9923d23a4f14b66504b192aba74.zip cpython-c68e723e6f8bd9923d23a4f14b66504b192aba74.tar.gz cpython-c68e723e6f8bd9923d23a4f14b66504b192aba74.tar.bz2 |
Issue #25717: Merge comment from 3.5
Diffstat (limited to 'Modules/_io')
-rw-r--r-- | Modules/_io/fileio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c index 5f88d58..dbd604a 100644 --- a/Modules/_io/fileio.c +++ b/Modules/_io/fileio.c @@ -443,6 +443,9 @@ _io_FileIO___init___impl(fileio *self, PyObject *nameobj, const char *mode, 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); |