Get quit() and exit() to work cleanly when not using subprocess.
This commit is contained in:
parent
b1cb56ad17
commit
f137e1df2c
|
@ -713,14 +713,17 @@ class ModifiedInterpreter(InteractiveInterpreter):
|
||||||
else:
|
else:
|
||||||
exec code in self.locals
|
exec code in self.locals
|
||||||
except SystemExit:
|
except SystemExit:
|
||||||
if tkMessageBox.askyesno(
|
if not self.tkconsole.closing:
|
||||||
"Exit?",
|
if tkMessageBox.askyesno(
|
||||||
"Do you want to exit altogether?",
|
"Exit?",
|
||||||
default="yes",
|
"Do you want to exit altogether?",
|
||||||
master=self.tkconsole.text):
|
default="yes",
|
||||||
raise
|
master=self.tkconsole.text):
|
||||||
|
raise
|
||||||
|
else:
|
||||||
|
self.showtraceback()
|
||||||
else:
|
else:
|
||||||
self.showtraceback()
|
raise
|
||||||
except:
|
except:
|
||||||
if use_subprocess:
|
if use_subprocess:
|
||||||
print >> self.tkconsole.stderr, \
|
print >> self.tkconsole.stderr, \
|
||||||
|
|
Loading…
Reference in New Issue