summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/errors.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/errors.c b/Python/errors.c
index a2d1a82..1f955b5 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -588,7 +588,7 @@ PyObject *PyErr_SetExcFromWindowsErr(PyObject *exc, int ierr)
PyObject *PyErr_SetFromWindowsErr(int ierr)
{
- return PyErr_SetExcFromWindowsErrWithFilename(PyExc_WindowsError,
+ return PyErr_SetExcFromWindowsErrWithFilename(PyExc_OSError,
ierr, NULL);
}
PyObject *PyErr_SetFromWindowsErrWithFilename(
@@ -597,7 +597,7 @@ PyObject *PyErr_SetFromWindowsErrWithFilename(
{
PyObject *name = filename ? PyUnicode_DecodeFSDefault(filename) : NULL;
PyObject *result = PyErr_SetExcFromWindowsErrWithFilenameObject(
- PyExc_WindowsError,
+ PyExc_OSError,
ierr, name);
Py_XDECREF(name);
return result;
@@ -611,7 +611,7 @@ PyObject *PyErr_SetFromWindowsErrWithUnicodeFilename(
PyUnicode_FromUnicode(filename, wcslen(filename)) :
NULL;
PyObject *result = PyErr_SetExcFromWindowsErrWithFilenameObject(
- PyExc_WindowsError,
+ PyExc_OSError,
ierr, name);
Py_XDECREF(name);
return result;