summaryrefslogtreecommitdiffstats
path: root/Modules/_io/iobase.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_io/iobase.c')
-rw-r--r--Modules/_io/iobase.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/_io/iobase.c b/Modules/_io/iobase.c
index babb019..2039147 100644
--- a/Modules/_io/iobase.c
+++ b/Modules/_io/iobase.c
@@ -669,7 +669,10 @@ iobase_writelines(PyObject *self, PyObject *args)
break; /* Stop Iteration */
}
- res = PyObject_CallMethodObjArgs(self, _PyIO_str_write, line, NULL);
+ res = NULL;
+ do {
+ res = PyObject_CallMethodObjArgs(self, _PyIO_str_write, line, NULL);
+ } while (res == NULL && _PyIO_trap_eintr());
Py_DECREF(line);
if (res == NULL) {
Py_DECREF(iter);