mirror of https://github.com/python/cpython
Issue #16582: use int exit code in tkinter._exit
This commit is contained in:
parent
2e72831369
commit
806bfad457
|
@ -146,8 +146,12 @@ def _tkerror(err):
|
||||||
"""Internal function."""
|
"""Internal function."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def _exit(code='0'):
|
def _exit(code=0):
|
||||||
"""Internal function. Calling it will throw the exception SystemExit."""
|
"""Internal function. Calling it will throw the exception SystemExit."""
|
||||||
|
try:
|
||||||
|
code = int(code)
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
raise SystemExit(code)
|
raise SystemExit(code)
|
||||||
|
|
||||||
_varnum = 0
|
_varnum = 0
|
||||||
|
|
Loading…
Reference in New Issue