[3.12] gh-102832: IDLE - update stackviewer open (GH-105528) (#105534)

gh-102832: IDLE - update stackviewer open (GH-105528)

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

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
Miss Islington (bot) 2023-06-08 15:29:24 -07:00 committed by GitHub
parent f565fed548
commit 3eccd95f56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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