diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2011-06-20 14:37:59 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2011-06-20 14:37:59 (GMT) |
commit | 54e647f21511feca159a734b49878f566c72ab1d (patch) | |
tree | f9e1ed17cd79ab25a4c40b0ab41552e9143f9bef /Python | |
parent | 1dbb7591dad2b8a59cc856f1784aba1c8207012b (diff) | |
parent | d417d01ec80d9d13918fc90fd3ce0080232a8e7c (diff) | |
download | cpython-54e647f21511feca159a734b49878f566c72ab1d.zip cpython-54e647f21511feca159a734b49878f566c72ab1d.tar.gz cpython-54e647f21511feca159a734b49878f566c72ab1d.tar.bz2 |
merge heads
Diffstat (limited to 'Python')
-rw-r--r-- | Python/import.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c index de5dc0c..19e975a 100644 --- a/Python/import.c +++ b/Python/import.c @@ -3567,6 +3567,10 @@ call_find_module(PyObject *name, PyObject *path_list) if (fd != -1) fd = dup(fd); fclose(fp); + if (fd == -1) { + PyErr_SetFromErrno(PyExc_OSError); + return NULL; + } fp = NULL; } if (fd != -1) { |