Hynek Schlawack <h...@ox.cx> added the comment: I think this issue is still valid. However, I’d favor the attached (simpler) patch that keeps track whether self->fd is our own (i.e. a result of an open() operation) or from outside.
A couple of notes: - I'm not sure why your test skipped if the Exception wasn't raised, I'd say that's a valid test fail. - The fd has been closed explicitly when seeking for append mode failed, so I removed it. - I'm not convinced it's worth/sensible to be back ported as it's a change in behavior. Tests succeed on OS X & Linux. Opinions? Win32 tests results? ---------- type: -> behavior Added file: http://bugs.python.org/file25753/fileio-do-not-close-on-fail.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10053> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com