Message123058
| Author |
v+python |
| Recipients |
v+python |
| Date |
2010年12月02日.06:59:29 |
| SpamBayes Score |
7.3528045e-06 |
| Marked as misclassified |
No |
| Message-id |
<1291273171.38.0.212698276713.issue10482@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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() |
|
History
|
|---|
| 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 |
|