Message176698
When a callback function gets called from Tkinter and raises SystemExit (either directly or through sys.exit), a new SystemExit exception is raised with the original exception as its code field, such as
SystemExit(SystemExit(),)
This is due to a bug in Tkinter's CallWrapper, where it has
except SystemExit as msg:
raise SystemExit(msg)
which since msg is a SystemExit instance, creates the nesting. This bug did not exist in Python 2 because there the code was
except SystemExit, msg:
raise SystemExit, msg
and this raises msg, as it already is a SystemExit instance. I suspect the bug was introduced by using the 2to3 tool, as it will do the conversion. If so, this is a bug in 2to3, as the two snippets are not functionally identical. |
|
Date |
User |
Action |
Args |
2012-11-30 18:14:44 | Abraham Karplus | set | recipients:
+ Abraham Karplus |
2012-11-30 18:14:43 | Abraham Karplus | set | messageid: <1354299283.97.0.595004930549.issue16583@psf.upfronthosting.co.za> |
2012-11-30 18:14:43 | Abraham Karplus | link | issue16583 messages |
2012-11-30 18:14:43 | Abraham Karplus | create | |
|