#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:56:57 -04:00
parent 0aa685a33c
commit 3583761bcd
4 changed files with 30 additions and 0 deletions

View file

@ -3712,6 +3712,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);