summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2012-11-05 00:20:58 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2012-11-05 00:20:58 (GMT)
commit4e7d2d481a5ab86977bd9dbafbceabec7b48883b (patch)
tree02ef7816d71ce8f7562501faa4baad5d9db2d99c
parentec8c8ae7ae8553d108d09a29e530bf6f9a95a0c3 (diff)
downloadcpython-4e7d2d481a5ab86977bd9dbafbceabec7b48883b.zip
cpython-4e7d2d481a5ab86977bd9dbafbceabec7b48883b.tar.gz
cpython-4e7d2d481a5ab86977bd9dbafbceabec7b48883b.tar.bz2
Issue #15478: Oops, fix regression in os.open() on Windows
os.open() uses _wopen() which sets errno, not the Windows error code.
-rw-r--r--Modules/posixmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 8cedb9e..3f863a8 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -7057,7 +7057,7 @@ posix_open(PyObject *self, PyObject *args, PyObject *kwargs)
Py_END_ALLOW_THREADS
if (fd == -1) {
- return_value = path_error(&path);
+ PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError, path.object);
goto exit;
}