do not grab the result if it was in a gatherop

This commit is contained in:
Joris Vink 2019-03-19 13:58:00 +01:00
parent 8afaac9fde
commit d371454dad
1 changed files with 1 additions and 1 deletions

View File

@ -542,7 +542,7 @@ python_coro_run(struct python_coro *coro)
item = _PyGen_Send((PyGenObject *)coro->obj, NULL);
if (item == NULL) {
if (PyErr_Occurred() &&
if (coro->gatherop == NULL && PyErr_Occurred() &&
PyErr_ExceptionMatches(PyExc_StopIteration)) {
PyErr_Fetch(&type, &coro->result, &traceback);
Py_DECREF(type);