Issue #16582: use int exit code in tkinter._exit
This commit is contained in:
commit
a6b292fbc7
|
@ -148,8 +148,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…
Reference in New Issue