From: Kurt B. Kaiser Date: Wed, 16 Aug 2006 07:04:17 +0000 (+0000) Subject: Get quit() and exit() to work cleanly when not using subprocess. X-Git-Tag: v2.5c1~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f137e1df2c02f5782c5b0f18a2b3b649f255f63a;p=python Get quit() and exit() to work cleanly when not using subprocess. --- diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 5790483e41..d6fd82b9f7 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -713,14 +713,17 @@ class ModifiedInterpreter(InteractiveInterpreter): else: exec code in self.locals except SystemExit: - if tkMessageBox.askyesno( - "Exit?", - "Do you want to exit altogether?", - default="yes", - master=self.tkconsole.text): - raise + if not self.tkconsole.closing: + if tkMessageBox.askyesno( + "Exit?", + "Do you want to exit altogether?", + default="yes", + master=self.tkconsole.text): + raise + else: + self.showtraceback() else: - self.showtraceback() + raise except: if use_subprocess: print >> self.tkconsole.stderr, \