diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2012-11-05 00:20:58 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2012-11-05 00:20:58 (GMT) |
commit | 4e7d2d481a5ab86977bd9dbafbceabec7b48883b (patch) | |
tree | 02ef7816d71ce8f7562501faa4baad5d9db2d99c | |
parent | ec8c8ae7ae8553d108d09a29e530bf6f9a95a0c3 (diff) | |
download | cpython-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.c | 2 |
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; } |