Commits

Kurt B. Kaiser committed 2dfe1c6

Get quit() and exit() to work cleanly when not using subprocess.

  • Participants
  • Parent commits 9133076
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Lib/idlelib/PyShell.py

                 else:
                     exec code in self.locals
             except SystemExit:
-                if tkMessageBox.askyesno(
-                    "Exit?",
-                    "Do you want to exit altogether?",
-                    default="yes",
-                    master=self.tkconsole.text):
+                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:
                     raise
-                else:
-                    self.showtraceback()
             except:
                 if use_subprocess:
                     print >> self.tkconsole.stderr, \