[3.9] bpo-42482: remove reference to exc_traceback from TracebackException (GH-23531) (GH-23578)

(cherry picked from commit 427613f005)


Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
This commit is contained in:
Miss Islington (bot) 2020-12-04 12:57:31 -08:00 committed by GitHub
parent 81ac030d03
commit 40b92f1cc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 3 deletions

View file

@ -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()