summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-11-28 16:12:28 +0000
committerAntoine Pitrou <solipsis@pitrou.net>2009-11-28 16:12:28 +0000
commita412ebff3dce42d46a21c7dded2e29c4243f4a8d (patch)
tree448351565ff5d0f2412a71ffe01f3bcd17ae91b4 /Python/pythonrun.c
parent1aedab71ae839359e30222423fa5b77d716cf63d (diff)
downloadcpython-a412ebff3dce42d46a21c7dded2e29c4243f4a8d.tar.gz
Issue #4486: When an exception has an explicit cause, do not print its implicit context too.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 875e44e99b..3764740e81 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -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();