seek after we sync

This commit is contained in:
benoitc 2010-02-27 18:04:04 +01:00
parent 87d3c4b3e7
commit 2348fc238d

View File

@ -138,10 +138,10 @@ class TeeInput(object):
chunk, self.buf = self.parser.filter_body(self.buf)
if chunk:
self.tmp.write(chunk)
self.tmp.seek(0, os.SEEK_END)
self.tmp.flush()
if hasattr(self.tmp, 'fileno'):
os.fsync(self.tmp.fileno())
self.tmp.seek(0, os.SEEK_END)
return chunk
if self.parser.body_eof():