forked from mirrors/kore
do not grab the result if it was in a gatherop
This commit is contained in:
parent
8afaac9fde
commit
d371454dad
|
@ -542,7 +542,7 @@ python_coro_run(struct python_coro *coro)
|
||||||
|
|
||||||
item = _PyGen_Send((PyGenObject *)coro->obj, NULL);
|
item = _PyGen_Send((PyGenObject *)coro->obj, NULL);
|
||||||
if (item == NULL) {
|
if (item == NULL) {
|
||||||
if (PyErr_Occurred() &&
|
if (coro->gatherop == NULL && PyErr_Occurred() &&
|
||||||
PyErr_ExceptionMatches(PyExc_StopIteration)) {
|
PyErr_ExceptionMatches(PyExc_StopIteration)) {
|
||||||
PyErr_Fetch(&type, &coro->result, &traceback);
|
PyErr_Fetch(&type, &coro->result, &traceback);
|
||||||
Py_DECREF(type);
|
Py_DECREF(type);
|
||||||
|
|
Loading…
Reference in New Issue