summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-11-28 16:12:28 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-11-28 16:12:28 (GMT)
commit7b0d4a238f2a69747ed570f8bfb51fb31315eba9 (patch)
tree0e1ea6c39a6ce48f33b1358992f26d3e5ce1081a /Python
parent1fc0d2b364b144e501615cf82e998beb87733607 (diff)
downloadcpython-7b0d4a238f2a69747ed570f8bfb51fb31315eba9.zip
cpython-7b0d4a238f2a69747ed570f8bfb51fb31315eba9.tar.gz
cpython-7b0d4a238f2a69747ed570f8bfb51fb31315eba9.tar.bz2
Issue #4486: When an exception has an explicit cause, do not print its implicit context too.
Diffstat (limited to 'Python')
-rw-r--r--Python/pythonrun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 875e44e..3764740 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();