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:
parent
ec8c8ae7ae
commit
4e7d2d481a
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue