mirror of
https://github.com/python/cpython.git
synced 2025-07-19 17:25:54 +00:00
Merge 3.5 (fix raise)
This commit is contained in:
commit
0a6996d87d
3 changed files with 24 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue