Commit 14857cf8 authored by Andrew Svetlov's avatar Andrew Svetlov

Issue #16582: use int exit code in tkinter._exit

parents 50cdd55a 806bfad4
...@@ -148,8 +148,12 @@ def _tkerror(err): ...@@ -148,8 +148,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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment