From 7b0d4a238f2a69747ed570f8bfb51fb31315eba9 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sat, 28 Nov 2009 16:12:28 +0000 Subject: Issue #4486: When an exception has an explicit cause, do not print its implicit context too. --- Python/pythonrun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/pythonrun.c') 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(); -- cgit v1.2.1