Message97185
.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. |
|
Date |
User |
Action |
Args |
2010-01-04 00:25:11 | sraustein | set | recipients:
+ sraustein |
2010-01-04 00:25:11 | sraustein | set | messageid: <1262564711.76.0.763774175522.issue7627@psf.upfronthosting.co.za> |
2010-01-04 00:25:10 | sraustein | link | issue7627 messages |
2010-01-04 00:25:09 | sraustein | create | |
|