diff options
author | Irit Katriel <iritkatriel@yahoo.com> | 2020-12-01 01:35:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-01 01:35:25 (GMT) |
commit | 427613f005f0f412d12f0d775d2b609bae0ae1ad (patch) | |
tree | 603c051eda2f8ee1717cdf58de01047184b79d2f /Lib/traceback.py | |
parent | 1244c816d7cdfa8a26d1671cab67122a8c5271a7 (diff) | |
download | cpython-427613f005f0f412d12f0d775d2b609bae0ae1ad.zip cpython-427613f005f0f412d12f0d775d2b609bae0ae1ad.tar.gz cpython-427613f005f0f412d12f0d775d2b609bae0ae1ad.tar.bz2 |
bpo-42482: remove reference to exc_traceback from TracebackException (GH-23531)
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 d2d93c8..457d925 100644 --- a/Lib/traceback.py +++ b/Lib/traceback.py @@ -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() |