summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2016-11-09 00:05:42 (GMT)
committerYury Selivanov <yury@magic.io>2016-11-09 00:05:42 (GMT)
commitbff8f647a97bbb7fb91d0a02b6133e5312410ca7 (patch)
tree38788c525839f3e1fabc5694330eeb0bf132cde5 /Modules
parent2ce7c960b4d80b671d991854b53cac5b5a6ded8b (diff)
parent692796a948ab67d75f7010e96b31885eefbd88e5 (diff)
downloadcpython-bff8f647a97bbb7fb91d0a02b6133e5312410ca7.zip
cpython-bff8f647a97bbb7fb91d0a02b6133e5312410ca7.tar.gz
cpython-bff8f647a97bbb7fb91d0a02b6133e5312410ca7.tar.bz2
Merge 3.6 (issue #26081)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_asynciomodule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c
index 7df6fa5..df81b10 100644
--- a/Modules/_asynciomodule.c
+++ b/Modules/_asynciomodule.c
@@ -1044,14 +1044,16 @@ FutureIter_throw(futureiterobject *self, PyObject *args)
else {
if (PyExceptionClass_Check(type)) {
val = PyObject_CallObject(type, NULL);
+ PyErr_SetObject(type, val);
+ Py_DECREF(val);
}
else {
val = type;
assert (PyExceptionInstance_Check(val));
type = (PyObject*)Py_TYPE(val);
assert (PyExceptionClass_Check(type));
+ PyErr_SetObject(type, val);
}
- PyErr_SetObject(type, val);
}
return FutureIter_iternext(self);
}