From: Terry Jan Reedy Date: Thu, 8 Jun 2023 21:59:55 +0000 (-0400) Subject: gh-102832: IDLE - update stackviewer open (#105528) X-Git-Tag: v3.13.0a1~1826 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bb3454c1a75c90da3c34c060eb23403fed3fd958;p=thirdparty%2FPython%2Fcpython.git gh-102832: IDLE - update stackviewer open (#105528) Use 'last_exc' instead of 'last_value' in 3.12/3. --- diff --git a/Lib/idlelib/pyshell.py b/Lib/idlelib/pyshell.py index 3141b477eff1..6028700356b1 100755 --- a/Lib/idlelib/pyshell.py +++ b/Lib/idlelib/pyshell.py @@ -1369,11 +1369,11 @@ class PyShell(OutputWindow): from idlelib.stackviewer import StackBrowser try: - StackBrowser(self.root, sys.last_value, self.flist) + StackBrowser(self.root, sys.last_exc, self.flist) except: messagebox.showerror("No stack trace", "There is no stack trace yet.\n" - "(sys.last_value is not defined)", + "(sys.last_exc is not defined)", parent=self.text) return None