Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6b8110 commit b2afe48Copy full SHA for b2afe48
1 file changed
Modules/_asynciomodule.c
@@ -631,15 +631,16 @@ create_cancelled_error(FutureObj *fut)
631
} else {
632
exc = PyObject_CallOneArg(asyncio_CancelledError, msg);
633
}
634
- PyException_SetContext(exc, fut->fut_cancelled_exc);
635
- Py_CLEAR(fut->fut_cancelled_exc);
636
return exc;
637
638
639
static void
640
future_set_cancelled_error(FutureObj *fut)
641
{
642
PyObject *exc = create_cancelled_error(fut);
+ if (exc == NULL) {
+ return;
643
+ }
644
PyErr_SetObject(asyncio_CancelledError, exc);
645
Py_DECREF(exc);
646
0 commit comments