diff options
Diffstat (limited to 'Modules/_multiprocessing/connection.h')
-rw-r--r-- | Modules/_multiprocessing/connection.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/_multiprocessing/connection.h b/Modules/_multiprocessing/connection.h index 581beac..2ee5368 100644 --- a/Modules/_multiprocessing/connection.h +++ b/Modules/_multiprocessing/connection.h @@ -139,8 +139,12 @@ connection_sendbytes(ConnectionObject *self, PyObject *args) res = conn_send_string(self, buffer + offset, size); PyBuffer_Release(&pbuffer); - if (res < 0) - return mp_SetError(PyExc_IOError, res); + if (res < 0) { + if (PyErr_Occurred()) + return NULL; + else + return mp_SetError(PyExc_IOError, res); + } Py_RETURN_NONE; } |