summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libfuncs.tex
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2006-12-20 19:48:20 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2006-12-20 19:48:20 (GMT)
commiteca4c31267526dffe471bc78712dd884c4f04c34 (patch)
tree7376032573207f5df59e599efa32bfccbafb7153 /Doc/lib/libfuncs.tex
parentded1c4df0b98b05af22d82bd8ae8795f7c8da916 (diff)
downloadcpython-eca4c31267526dffe471bc78712dd884c4f04c34.zip
cpython-eca4c31267526dffe471bc78712dd884c4f04c34.tar.gz
cpython-eca4c31267526dffe471bc78712dd884c4f04c34.tar.bz2
[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 'Doc/lib/libfuncs.tex')
0 files changed, 0 insertions, 0 deletions