[Python-checkins] cpython (2.7): Issue #16582: use int exit code in tkinter._exit
andrew.svetlov
python-checkins at python.org
Sun Dec 9 23:05:26 CET 2012
http://hg.python.org/cpython/rev/37c1d20facd7
changeset: 80795:37c1d20facd7
branch: 2.7
parent: 80788:856a1d79ad81
user: Andrew Svetlov <andrew.svetlov at gmail.com>
date: Mon Dec 10 00:05:08 2012 +0200
summary:
Issue #16582: use int exit code in tkinter._exit
files:
Lib/lib-tk/Tkinter.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -154,8 +154,12 @@
"""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
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list