Commit dddeb0ee authored by Kurt B. Kaiser's avatar Kurt B. Kaiser

Clean up ModifiedInterpreter.runcode() structure

parent ecf796ed
......@@ -706,7 +706,6 @@ class ModifiedInterpreter(InteractiveInterpreter):
debugger = self.debugger
try:
self.tkconsole.beginexecuting()
try:
if not debugger and self.rpcclt is not None:
self.active_seq = self.rpcclt.asyncqueue("exec", "runcode",
(code,), {})
......@@ -728,13 +727,16 @@ class ModifiedInterpreter(InteractiveInterpreter):
raise
except:
if use_subprocess:
# When run w/o subprocess, both user and IDLE errors
# are printed here; skip message in that case.
print >> self.tkconsole.stderr, \
print >>self.tkconsole.stderr, \
"IDLE internal error in runcode()"
self.showtraceback()
if use_subprocess:
self.tkconsole.endexecuting()
else:
if self.tkconsole.canceled:
self.tkconsole.canceled = False
print >>self.tkconsole.stderr, "KeyboardInterrupt"
else:
self.showtraceback()
finally:
if not use_subprocess:
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment