mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
bpo-42482: remove reference to exc_traceback from TracebackException (GH-23531)
This commit is contained in:
parent
1244c816d7
commit
427613f005
3 changed files with 25 additions and 3 deletions
|
@ -510,7 +510,6 @@ class TracebackException:
|
|||
_seen=_seen)
|
||||
else:
|
||||
context = None
|
||||
self.exc_traceback = exc_traceback
|
||||
self.__cause__ = cause
|
||||
self.__context__ = context
|
||||
self.__suppress_context__ = \
|
||||
|
@ -627,7 +626,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