[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened

William Barr report at bugs.python.org
Fri Dec 3 09:21:38 CET 2010


William Barr <webmaster961 at gmail.com> added the comment:

Ok, attached is a patch that should make IDLE silently ignore this happening; upon looking into this, it was a rather trivial fix.  The open function was waiting on the return input from the askopenfile call, during which the calling window was closed, setting the editwin parameter to None according to close.  The patch just adds another try/except to catch the AttributeError raised when the non-extant editwin's flist is referenced.  

I did come up with a method to actually make it continue with the opening process (just save a copy of the editwin's flist before the askopenfile call, during which the editwin gets closed), but that seemed a bit kludgey and possibly dangerous;, however it *seems* to work without issue.  I can upload that patch as well if anyone would care to review it in addition to the attached patch.

----------
keywords: +patch
Added file: http://bugs.python.org/file19922/issue10365.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10365>
_______________________________________


More information about the Python-bugs-list mailing list