diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2006-08-16 07:04:17 (GMT) |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2006-08-16 07:04:17 (GMT) |
commit | f137e1df2c02f5782c5b0f18a2b3b649f255f63a (patch) | |
tree | c695f63924a433e939d9a4e06c2850155a353900 /Lib/idlelib/PyShell.py | |
parent | b1cb56ad171eb9f2660cca7cc8fd9ae25564b73b (diff) | |
download | cpython-f137e1df2c02f5782c5b0f18a2b3b649f255f63a.zip cpython-f137e1df2c02f5782c5b0f18a2b3b649f255f63a.tar.gz cpython-f137e1df2c02f5782c5b0f18a2b3b649f255f63a.tar.bz2 |
Get quit() and exit() to work cleanly when not using subprocess.
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rw-r--r-- | Lib/idlelib/PyShell.py | 17 |
1 files changed, 10 insertions, 7 deletions
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 @@ 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, \ |