commit | 72146124432fd9372032de1a3a508236ea4ab0d4 | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Wed Feb 22 18:03:04 2012 +0100 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Wed Feb 22 18:03:04 2012 +0100 |
tree | 60f895f534a61be8d3b15d124aa4341b36344961 | |
parent | 9f64f731933bfebf6767a42a0ae75503c1936454 [diff] [blame] |
In find_module(), do not silence fileno() and dup() errors.
diff --git a/Python/import.c b/Python/import.c index beda7f9..e5581c5 100644 --- a/Python/import.c +++ b/Python/import.c
@@ -3186,6 +3186,8 @@ fd = dup(fd); fclose(fp); fp = NULL; + if (fd == -1) + return PyErr_SetFromErrno(PyExc_OSError); } if (fd != -1) { if (strchr(fdp->mode, 'b') == NULL) {