summaryrefslogtreecommitdiffstats
path: root/Modules/mmapmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-03-17 23:22:14 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-03-17 23:22:14 (GMT)
commita555cfcb73cf677a99d29af6fa0bcfe4c35a2aeb (patch)
treefa88ce2ae8c7d2213dc3e80845405d0d8719308a /Modules/mmapmodule.c
parent6562b29e13f4da98558636c43a1b242698c8f8d9 (diff)
downloadcpython-a555cfcb73cf677a99d29af6fa0bcfe4c35a2aeb.zip
cpython-a555cfcb73cf677a99d29af6fa0bcfe4c35a2aeb.tar.gz
cpython-a555cfcb73cf677a99d29af6fa0bcfe4c35a2aeb.tar.bz2
Issue #23694: Enhance _Py_open(), it now raises exceptions
* _Py_open() now raises exceptions on error. If open() fails, it raises an OSError with the filename. * _Py_open() now releases the GIL while calling open() * Add _Py_open_noraise() when _Py_open() cannot be used because the GIL is not held
Diffstat (limited to 'Modules/mmapmodule.c')
-rw-r--r--Modules/mmapmodule.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index ac134b8..7c4d17f 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -1221,7 +1221,6 @@ new_mmap_object(PyTypeObject *type, PyObject *args, PyObject *kwdict)
fd = devzero = _Py_open("/dev/zero", O_RDWR);
if (devzero == -1) {
Py_DECREF(m_obj);
- PyErr_SetFromErrno(PyExc_OSError);
return NULL;
}
#endif