summaryrefslogtreecommitdiffstats
path: root/Modules/readline.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/readline.c')
-rw-r--r--Modules/readline.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/readline.c b/Modules/readline.c
index 389954f..dfbbb29 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -188,7 +188,7 @@ read_init_file(PyObject *self, PyObject *args)
} else
errno = rl_read_init_file(NULL);
if (errno)
- return PyErr_SetFromErrno(PyExc_IOError);
+ return PyErr_SetFromErrno(PyExc_OSError);
Py_RETURN_NONE;
}
@@ -214,7 +214,7 @@ read_history_file(PyObject *self, PyObject *args)
} else
errno = read_history(NULL);
if (errno)
- return PyErr_SetFromErrno(PyExc_IOError);
+ return PyErr_SetFromErrno(PyExc_OSError);
Py_RETURN_NONE;
}
@@ -249,7 +249,7 @@ write_history_file(PyObject *self, PyObject *args)
Py_XDECREF(filename_bytes);
errno = err;
if (errno)
- return PyErr_SetFromErrno(PyExc_IOError);
+ return PyErr_SetFromErrno(PyExc_OSError);
Py_RETURN_NONE;
}
@@ -285,7 +285,7 @@ append_history_file(PyObject *self, PyObject *args)
Py_XDECREF(filename_bytes);
errno = err;
if (errno)
- return PyErr_SetFromErrno(PyExc_IOError);
+ return PyErr_SetFromErrno(PyExc_OSError);
Py_RETURN_NONE;
}