]> granicus.if.org Git - python/commitdiff
#18196: Avoid displaying spurious SystemExit tracebacks.
authorRoger Serwy <roger.serwy@gmail.com>
Wed, 12 Jun 2013 03:25:14 +0000 (22:25 -0500)
committerRoger Serwy <roger.serwy@gmail.com>
Wed, 12 Jun 2013 03:25:14 +0000 (22:25 -0500)
Lib/idlelib/run.py
Misc/NEWS

index 88da23ba0721d940b407d47a9b5e699cbeb062f5..f5d260d2ccd3edd10aa6d5a33597777ef3e8acdb 100644 (file)
@@ -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:
index cd76c4c6238f9c7084d1a3cc944b8a7c66fbd023..f3f2a1e9f42a2e449658f66f18c756bc91a8f31b 100644 (file)
--- 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".