projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e72831
)
Issue #16582: use int exit code in tkinter._exit
author
Andrew Svetlov
<andrew.svetlov@gmail.com>
Sun, 9 Dec 2012 22:02:31 +0000
(
00:02
+0200)
committer
Andrew Svetlov
<andrew.svetlov@gmail.com>
Sun, 9 Dec 2012 22:02:31 +0000
(
00:02
+0200)
Lib/tkinter/__init__.py
patch
|
blob
|
history
diff --git
a/Lib/tkinter/__init__.py
b/Lib/tkinter/__init__.py
index 67a2f9a327fba680df57a2e90e09777f8ef7336a..70736623a187c0eef91349aae70245f7449a7c10 100644
(file)
--- a/
Lib/tkinter/__init__.py
+++ b/
Lib/tkinter/__init__.py
@@
-146,8
+146,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