diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-03-18 00:39:23 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-03-18 00:39:23 (GMT) |
commit | e42ccd2bfd7a05a02c1020b819e4ee5b26041d01 (patch) | |
tree | 071843848770176c8aed3f965d783738182847c3 /Python/import.c | |
parent | a555cfcb73cf677a99d29af6fa0bcfe4c35a2aeb (diff) | |
download | cpython-e42ccd2bfd7a05a02c1020b819e4ee5b26041d01.zip cpython-e42ccd2bfd7a05a02c1020b819e4ee5b26041d01.tar.gz cpython-e42ccd2bfd7a05a02c1020b819e4ee5b26041d01.tar.bz2 |
Issue #23694: Enhance _Py_fopen(), it now raises an exception on error
* If fopen() fails, OSError is raised with the original filename object.
* The GIL is now released while calling fopen()
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Python/import.c b/Python/import.c index c3b9e12..238e8d0 100644 --- a/Python/import.c +++ b/Python/import.c @@ -1945,8 +1945,6 @@ _imp_load_dynamic_impl(PyModuleDef *module, PyObject *name, PyObject *path, PyOb fp = _Py_fopen_obj(path, "r"); if (fp == NULL) { Py_DECREF(path); - if (!PyErr_Occurred()) - PyErr_SetFromErrno(PyExc_IOError); return NULL; } } |