This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sraustein
Recipients sraustein
Date 2010-01-04.00:25:09
SpamBayes Score 2.7671754e-12
Marked as misclassified No
Message-id <1262564711.76.0.763774175522.issue7627@psf.upfronthosting.co.za>
In-reply-to
Content
.remove() method of MH class in the mailbox module of the standard library references a file object after closing it.  This throws a ValueError exception (I/O operation on closed file).

The f.close() call just before the os.remove() call in the innermost try: block should just be removed, the finally: clause of the outer try: block will clean things up correctly.  As far as I know it is completely legal (if slightly unusual) to delete an open file on any unix-like operating system, and the locking semantics won't work correctly otherwise in any case.
History
Date User Action Args
2010-01-04 00:25:11srausteinsetrecipients: + sraustein
2010-01-04 00:25:11srausteinsetmessageid: <1262564711.76.0.763774175522.issue7627@psf.upfronthosting.co.za>
2010-01-04 00:25:10srausteinlinkissue7627 messages
2010-01-04 00:25:09srausteincreate