From 40b92f1cc06f9aaba813ae38266f424e0969b089 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Fri, 4 Dec 2020 12:57:31 -0800 Subject: [3.9] bpo-42482: remove reference to exc_traceback from TracebackException (GH-23531) (GH-23578) (cherry picked from commit 427613f005f0f412d12f0d775d2b609bae0ae1ad) Co-authored-by: Irit Katriel --- Lib/traceback.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Lib/traceback.py') diff --git a/Lib/traceback.py b/Lib/traceback.py index a19e38718b..fb34de9489 100644 --- a/Lib/traceback.py +++ b/Lib/traceback.py @@ -500,7 +500,6 @@ class TracebackException: _seen=_seen) else: context = None - self.exc_traceback = exc_traceback self.__cause__ = cause self.__context__ = context self.__suppress_context__ = \ @@ -617,7 +616,7 @@ class TracebackException: not self.__suppress_context__): yield from self.__context__.format(chain=chain) yield _context_message - if self.exc_traceback is not None: + if self.stack: yield 'Traceback (most recent call last):\n' - yield from self.stack.format() + yield from self.stack.format() yield from self.format_exception_only() -- cgit v1.2.1