]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-102832: IDLE - update stackviewer open (GH-105528) (#105534)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 8 Jun 2023 22:29:24 +0000 (15:29 -0700)
committerGitHub <noreply@github.com>
Thu, 8 Jun 2023 22:29:24 +0000 (22:29 +0000)
gh-102832: IDLE - update stackviewer open (GH-105528)

Use 'last_exc' instead of 'last_value' in 3.12/3.
(cherry picked from commit bb3454c1a75c90da3c34c060eb23403fed3fd958)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Lib/idlelib/pyshell.py

index 3141b477eff181713bde248cdd422a702bb28bde..6028700356b171809aa5574568e798b78e747910 100755 (executable)
@@ -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