Issue #4486: When an exception has an explicit cause, do not print its implicit context too.

This commit is contained in:
Antoine Pitrou 2009-11-28 16:12:28 +00:00
parent 1fc0d2b364
commit 7b0d4a238f
4 changed files with 30 additions and 5 deletions

View file

@ -1576,7 +1576,7 @@ print_exception_recursive(PyObject *f, PyObject *value, PyObject *seen)
cause_message, f);
}
}
if (context) {
else if (context) {
res = PySet_Contains(seen, context);
if (res == -1)
PyErr_Clear();