Roundup Robot added the comment:
New changeset fed68e0bce53 by Andrew Svetlov in branch '3.2':
Issue #16582: use int exit code in tkinter._exit
http://hg.python.org/cpython/rev/fed68e0bce53
New changeset e39677feabe0 by Andrew Svetlov in branch '3.3':
Issue #16582: use int exit code in
Andrew Svetlov added the comment:
Fixed. Thanks.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16582
___
Andrew Svetlov added the comment:
Thanks for report.
The patch is really trivial, but I don't sure if it can be applied to released
python versions.
--
keywords: +patch
nosy: +asvetlov
Added file: http://bugs.python.org/file28198/issue16582.diff
___
Serhiy Storchaka added the comment:
The code was changed in the changeset e8a2a5e4c7b0.
def _exit(code='0'):
- import sys
- sys.exit(getint(code))
+ raise SystemExit, code
I think it is a bug and should be fixed.
--
nosy: +gvanrossum, serhiy.storchaka
Abraham Karplus added the comment:
I'd be fine with having it fixed just in 3.4, as it is easy enough to work
around for now. (Call deletecommand('exit') and then createcommand('exit',
working_exit_function) with working_exit function being the patched version of
_exit.)
--
New submission from Abraham Karplus:
Exiting a Tkinter application normally results in printing '0' and exiting with
error code 1. This is a result of Tkinter's _exit function, whose default
argument for code is the string '0'. It then calls SystemExit with the code
argument. However,
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +gpolo
versions: -Python 2.6, Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16582
___