summaryrefslogtreecommitdiff
path: root/Lib/test/test_htmlparser.py
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2006-12-20 19:48:20 +0000
committerAndrew M. Kuchling <amk@amk.ca>2006-12-20 19:48:20 +0000
commiteca4c31267526dffe471bc78712dd884c4f04c34 (patch)
tree7376032573207f5df59e599efa32bfccbafb7153 /Lib/test/test_htmlparser.py
parentded1c4df0b98b05af22d82bd8ae8795f7c8da916 (diff)
downloadcpython-git-eca4c31267526dffe471bc78712dd884c4f04c34.tar.gz
[Apply length-checking.diff from bug #1599254]
Add length checking to single-file mailbox formats: before doing a flush() on a mailbox, seek to the end and verify its length is unchanged, raising ExternalClashError if the file's length has changed. This fix avoids potential data loss if some other process appends to the mailbox file after the table of contents has been generated; instead of overwriting the modified file, you'll get the exception. I also noticed that the self._lookup() call in self.flush() wasn't necessary (everything that sets self._pending to True also calls self.lookup()), and replaced it by an assertion. 2.5 backport candidate.
Diffstat (limited to 'Lib/test/test_htmlparser.py')
0 files changed, 0 insertions, 0 deletions