From 4d1f033986675b883b9ff14588ae6ff78fdde313 Mon Sep 17 00:00:00 2001 From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Sun, 19 Mar 2023 16:19:59 +0000 Subject: gh-102778: revert changes to idlelib (#102825) --- Lib/idlelib/pyshell.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'Lib/idlelib/pyshell.py') diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py index edc77ff26f6..e68233a5a41 100755 --- a/Lib/idlelib/pyshell.py +++ b/Lib/idlelib/pyshell.py @@ -1367,14 +1367,11 @@ class PyShell(OutputWindow): if self.interp.rpcclt: return self.interp.remote_stack_viewer() try: - if hasattr(sys, 'last_exc'): - sys.last_exc.__traceback__ - else: - sys.last_traceback + sys.last_traceback except: messagebox.showerror("No stack trace", "There is no stack trace yet.\n" - "(sys.last_exc and sys.last_traceback are not defined)", + "(sys.last_traceback is not defined)", parent=self.text) return from idlelib.stackviewer import StackBrowser -- cgit v1.2.3