Commit 72146124 authored by Antoine Pitrou's avatar Antoine Pitrou

In find_module(), do not silence fileno() and dup() errors.

parent 9f64f731
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment