Kaydet (Commit) 4e7d2d48 authored tarafından Victor Stinner's avatar Victor Stinner

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

os.open() uses _wopen() which sets errno, not the Windows error code.
üst ec8c8ae7
...@@ -7057,7 +7057,7 @@ posix_open(PyObject *self, PyObject *args, PyObject *kwargs) ...@@ -7057,7 +7057,7 @@ posix_open(PyObject *self, PyObject *args, PyObject *kwargs)
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
if (fd == -1) { if (fd == -1) {
return_value = path_error(&path); PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError, path.object);
goto exit; goto exit;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment