Get quit() and exit() to work cleanly when not using subprocess.
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 5790483..d6fd82b 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -713,14 +713,17 @@
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, \