R. David Murray <rdmur...@bitdance.com> added the comment: Here's a patch that fixes the reported bug (calling close twice fails with an AttributeError) the simple way.
Note that there was actually a test for the buggy behavior, which is rather odd considering that there is also a 'closed' method that would fail similarly if close was ever called. (The only use for the existing 'closed' method that I can see is to see if somebody else closed the file out from under the ProxyFile, a 'feature' that seems of dubious utility.) It seems clear to me that calling close more than once should be legal, so I fixed the test. closed will still report if the underlying file has been closed out from under ProxyFile. Steffen, I still don't understand what you are trying to achieve with your patches. I plan to close this issue by applying my patch. ---------- assignee: -> r.david.murray Added file: http://bugs.python.org/file21688/mailbox_close_twice.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11700> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com