Issue #15478: Oops, fix regression in os.open() on Windows

os.open() uses _wopen() which sets errno, not the Windows error code.
This commit is contained in:
Victor Stinner 2012-11-05 01:20:58 +01:00
parent ec8c8ae7ae
commit 4e7d2d481a
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}