Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f467521

Browse files
committed
#18196: Avoid displaying spurious SystemExit tracebacks.
1 parent 036e849 commit f467521

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

Lib/idlelib/run.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,10 @@ def runcode(self, code):
339339
exec(code, self.locals)
340340
finally:
341341
interruptable = False
342+
except SystemExit:
343+
# Scripts that raise SystemExit should just
344+
# return to the interactive prompt
345+
pass
342346
except:
343347
self.usr_exc_info = sys.exc_info()
344348
if quitting:

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ Library
8181
IDLE
8282
----
8383

84+
- Issue #18196: Avoid displaying spurious SystemExit tracebacks.
85+
8486
- Issue #5492: Avoid traceback when exiting IDLE caused by a race condition.
8587

8688
- Issue #17511: Keep IDLE find dialog open after clicking "Find Next".

0 commit comments

Comments
 (0)