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 akuchling
Recipients
Date 2006-12-20.14:46:13
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Attaching a patch that adds length checking: before doing a flush() on a single-file mailbox, seek to the end and verify its length is unchanged.  It raises an ExternalClashError if the file's length has changed.  (Should there be a different exception for this case, perhaps a subclass of ExternalClashError?)

I verified that this change works by running a program that added 25 messages, pausing between each one, and then did 'echo "new line" > /tmp/mbox' from a shell while the program was running.

I also noticed that the self._lookup() call in self.flush() wasn't necessary, and replaced it by an assertion.

I think this change should go on both the trunk and 25-maint branches.

File Added: length-checking.diff
History
Date User Action Args
2007-08-23 14:50:00adminlinkissue1599254 messages
2007-08-23 14:50:00admincreate