summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRoger Serwy <roger.serwy@gmail.com>2013-06-12 03:25:14 (GMT)
committerRoger Serwy <roger.serwy@gmail.com>2013-06-12 03:25:14 (GMT)
commitf4675219273d902de8d20280746a8ada6c8aa4b8 (patch)
tree3cea55520ce5fc569b6cde06feebbbd59d19b6c7 /Lib
parent036e84924a0e0bdcc3c17033ea0263a3462825e1 (diff)
downloadcpython-f4675219273d902de8d20280746a8ada6c8aa4b8.zip
cpython-f4675219273d902de8d20280746a8ada6c8aa4b8.tar.gz
cpython-f4675219273d902de8d20280746a8ada6c8aa4b8.tar.bz2
#18196: Avoid displaying spurious SystemExit tracebacks.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/idlelib/run.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
index 88da23b..f5d260d 100644
--- a/Lib/idlelib/run.py
+++ b/Lib/idlelib/run.py
@@ -339,6 +339,10 @@ class Executive(object):
exec(code, self.locals)
finally:
interruptable = False
+ except SystemExit:
+ # Scripts that raise SystemExit should just
+ # return to the interactive prompt
+ pass
except:
self.usr_exc_info = sys.exc_info()
if quitting: