mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
[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:
parent
81ac030d03
commit
40b92f1cc0
3 changed files with 25 additions and 3 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue