From 25969654992d4208c0941f37e13e26d61381ccdc Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 26 Jan 2015 15:11:17 +0100 Subject: Python issue #23208: Don't use the traceback of the current handle if we already know the traceback of the source. The handle may be more revelant, but having 3 tracebacks (handle, source, exception) becomes more difficult to read. The handle may be preferred later but it requires more work to make this choice. --- asyncio/base_events.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/asyncio/base_events.py b/asyncio/base_events.py index 1c51a7c..e40d3ad 100644 --- a/asyncio/base_events.py +++ b/asyncio/base_events.py @@ -956,7 +956,8 @@ class BaseEventLoop(events.AbstractEventLoop): else: exc_info = False - if (self._current_handle is not None + if ('source_traceback' not in context + and self._current_handle is not None and self._current_handle._source_traceback): context['handle_traceback'] = self._current_handle._source_traceback -- cgit v1.2.1