Merge 3.5 (fix raise)

This commit is contained in:
Victor Stinner 2016-08-18 18:14:15 +02:00
commit 0a6996d87d
3 changed files with 24 additions and 1 deletions

View file

@ -4154,7 +4154,7 @@ do_raise(PyObject *exc, PyObject *cause)
type = tstate->exc_type;
value = tstate->exc_value;
tb = tstate->exc_traceback;
if (type == Py_None) {
if (type == Py_None || type == NULL) {
PyErr_SetString(PyExc_RuntimeError,
"No active exception to reraise");
return 0;