Message123058
Here's an updated _writerthread idea that handles more cases:
def _writerthread(self, fhr, fhw, length=None):
if length is None:
flag = True
while flag:
buf = fhr.read( 512 )
fhw.write( buf )
if len( buf ) == 0:
flag = False
else:
while length > 0:
buf = fhr.read( min( 512, length ))
fhw.write( buf )
length -= len( buf )
# throw away additional data [see bug #427345]
while select.select([fhr._sock], [], [], 0)[0]:
if not fhr._sock.recv(1):
break
fhw.close() |
|
Date |
User |
Action |
Args |
2010-12-02 06:59:31 | v+python | set | recipients:
+ v+python |
2010-12-02 06:59:31 | v+python | set | messageid: <1291273171.38.0.212698276713.issue10482@psf.upfronthosting.co.za> |
2010-12-02 06:59:29 | v+python | link | issue10482 messages |
2010-12-02 06:59:29 | v+python | create | |
|