mirror of
https://github.com/python/cpython.git
synced 2024-11-27 11:55:13 +08:00
In find_module(), do not silence fileno() and dup() errors.
This commit is contained in:
parent
9f64f73193
commit
7214612443
@ -3186,6 +3186,8 @@ call_find_module(char *name, PyObject *path)
|
||||
fd = dup(fd);
|
||||
fclose(fp);
|
||||
fp = NULL;
|
||||
if (fd == -1)
|
||||
return PyErr_SetFromErrno(PyExc_OSError);
|
||||
}
|
||||
if (fd != -1) {
|
||||
if (strchr(fdp->mode, 'b') == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user