From: Roger Serwy Date: Wed, 12 Jun 2013 03:25:14 +0000 (-0500) Subject: #18196: Avoid displaying spurious SystemExit tracebacks. X-Git-Tag: v3.4.0a1~528^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f4675219273d902de8d20280746a8ada6c8aa4b8;p=python #18196: Avoid displaying spurious SystemExit tracebacks. --- diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index 88da23ba07..f5d260d2cc 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: diff --git a/Misc/NEWS b/Misc/NEWS index cd76c4c623..f3f2a1e9f4 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -81,6 +81,8 @@ Library IDLE ---- +- Issue #18196: Avoid displaying spurious SystemExit tracebacks. + - Issue #5492: Avoid traceback when exiting IDLE caused by a race condition. - Issue #17511: Keep IDLE find dialog open after clicking "Find Next".