From b8d0bcab60af86bb0d982ef0483eec7930a0a9d0 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 18 Mar 2015 00:22:14 +0100 Subject: 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 --- Modules/mmapmodule.c | 1 - 1 file changed, 1 deletion(-) (limited to 'Modules/mmapmodule.c') diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index ac134b837d..7c4d17f243 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 -- cgit v1.2.1