diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-12-04 12:57:31 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-04 12:57:31 -0800 |
commit | 40b92f1cc06f9aaba813ae38266f424e0969b089 (patch) | |
tree | 8c62be7bddcbdedd4cd77685d91a3b6247d284f7 /Lib/traceback.py | |
parent | 81ac030d03bdaedd724603af6f89f9248a5f2700 (diff) | |
download | cpython-git-40b92f1cc06f9aaba813ae38266f424e0969b089.tar.gz |
[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 <iritkatriel@yahoo.com>
Diffstat (limited to 'Lib/traceback.py')
-rw-r--r-- | Lib/traceback.py | 5 |
1 files changed, 2 insertions, 3 deletions
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() |