[Python-checkins] cpython (merge 3.2 -> 3.3): Issue #16582: use int exit code in tkinter._exit
andrew.svetlov
python-checkins at python.org
Sun Dec 9 23:05:24 CET 2012
http://hg.python.org/cpython/rev/e39677feabe0
changeset: 80793:e39677feabe0
branch: 3.3
parent: 80790:10ad43456c29
parent: 80792:fed68e0bce53
user: Andrew Svetlov <andrew.svetlov at gmail.com>
date: Mon Dec 10 00:03:39 2012 +0200
summary:
Issue #16582: use int exit code in tkinter._exit
files:
Lib/tkinter/__init__.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
--- a/Lib/tkinter/__init__.py
+++ b/Lib/tkinter/__init__.py
@@ -148,8 +148,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