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 r.david.murray
Recipients SilentGhost, georg.brandl, r.david.murray, sdaoden
Date 2011-02-11.14:17:16
SpamBayes Score 2.0684876e-05
Marked as misclassified No
Message-id <1297433837.27.0.983572823255.issue11116@psf.upfronthosting.co.za>
In-reply-to
Content
The finally was doing a _sync_close, which flushes the tmp file and closes it.  The except Exception is checking if any non-BaseException error occurs, *removing* the tmp file, and re-raising the exception.  There's nothing to flush/close in that case.  Then, the else: clause of the exception deals with doing the _sync_close if, eg, we had a keyboard interrupt.  That may or may not leave the mailbox in a sensible state, but it is no worse than the previous behavior.  Certainly for any non-BaseException exception the new code is better; previously you'd most likely wind up with an empty or partially written message tmp file.  I'm open to changing to BaseException, though, if you think that would be better (I can see the argument for that).
History
Date User Action Args
2011-02-11 14:17:17r.david.murraysetrecipients: + r.david.murray, georg.brandl, SilentGhost, sdaoden
2011-02-11 14:17:17r.david.murraysetmessageid: <1297433837.27.0.983572823255.issue11116@psf.upfronthosting.co.za>
2011-02-11 14:17:16r.david.murraylinkissue11116 messages
2011-02-11 14:17:16r.david.murraycreate