diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-01-26 15:11:17 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-01-26 15:11:17 +0100 |
commit | 25969654992d4208c0941f37e13e26d61381ccdc (patch) | |
tree | a7a2463d841d153d504186ef21ee7c261e411b66 | |
parent | 20666ab4e01e1d7272500d3e09c8f7f98d034270 (diff) | |
download | trollius-25969654992d4208c0941f37e13e26d61381ccdc.tar.gz |
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.
-rw-r--r-- | asyncio/base_events.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 |