summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-19 12:33:35 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-19 12:33:35 (GMT)
commit2606a6f197a49f04611cb5cb0d67404d1ab14481 (patch)
tree35c228625105050ec2f593e6b362ce9e2498c760 /Python
parent8a045cb93bded97220422a957941bb68341429d1 (diff)
downloadcpython-2606a6f197a49f04611cb5cb0d67404d1ab14481.zip
cpython-2606a6f197a49f04611cb5cb0d67404d1ab14481.tar.gz
cpython-2606a6f197a49f04611cb5cb0d67404d1ab14481.tar.bz2
Issue #16719: Get rid of WindowsError. Use OSError instead
Patch by Serhiy Storchaka.
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;