mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Keep IDLE from displaying spurious SystemExit tracebacks
when running scripts that terminated by raising SystemExit (i.e. unittest and turtledemo).
This commit is contained in:
parent
a5e7f8f8e0
commit
4234992c75
2 changed files with 7 additions and 1 deletions
|
@ -301,11 +301,14 @@ class Executive(object):
|
|||
exec code in 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:
|
||||
exit()
|
||||
# even print a user code SystemExit exception, continue
|
||||
print_exception()
|
||||
jit = self.rpchandler.console.getvar("<<toggle-jit-stack-viewer>>")
|
||||
if jit:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue