mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Issue #16582: use int exit code in tkinter._exit
This commit is contained in:
parent
bfb0989ea7
commit
33b9b71e8d
1 changed files with 5 additions and 1 deletions
|
@ -154,8 +154,12 @@ def _tkerror(err):
|
|||
"""Internal function."""
|
||||
pass
|
||||
|
||||
def _exit(code='0'):
|
||||
def _exit(code=0):
|
||||
"""Internal function. Calling it will throw the exception SystemExit."""
|
||||
try:
|
||||
code = int(code)
|
||||
except ValueError:
|
||||
pass
|
||||
raise SystemExit, code
|
||||
|
||||
_varnum = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue