[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened
Roger Serwy
report at bugs.python.org
Sun May 27 21:11:08 CEST 2012
Roger Serwy <roger.serwy at gmail.com> added the comment:
(I need to write an extension to auto-apply strip-trailing-whitespace on save.)
Terry, I agree that the comment needs improvement. The self.editwin reference to the window needs to be available so that .get_saved() doesn't fail. In retrospect, the original patch obscured this point.
Attached is issue10365_rev3.patch, meant to be used against the latest code. It refactors the shell detection as part of the conditional as well as clarifies the comments.
The "Code for use outside IDLE" is part of a test at the end of the file which uses a duck-typed "EditorWindow" object. This object has flist=None which allows this extra code to run.
----------
Added file: http://bugs.python.org/file25735/issue10365_rev3.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10365>
_______________________________________
More information about the Python-bugs-list
mailing list