Merge #17413: make sure settrace funcs get passed exception instances for 'value'.

Patch by Ingrid Cheung and Brendan McLoughlin.
This commit is contained in:
R David Murray 2013-04-19 12:57:54 -04:00
commit f097f175dd
4 changed files with 30 additions and 0 deletions

View file

@ -3793,6 +3793,7 @@ call_exc_trace(Py_tracefunc func, PyObject *self, PyFrameObject *f)
value = Py_None;
Py_INCREF(value);
}
PyErr_NormalizeException(&type, &value, &traceback);
arg = PyTuple_Pack(3, type, value, traceback);
if (arg == NULL) {
PyErr_Restore(type, value, traceback);