homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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:31v+pythonsetrecipients: + v+python
2010年12月02日 06:59:31v+pythonsetmessageid: <1291273171.38.0.212698276713.issue10482@psf.upfronthosting.co.za>
2010年12月02日 06:59:29v+pythonlinkissue10482 messages
2010年12月02日 06:59:29v+pythoncreate

AltStyle によって変換されたページ (->オリジナル) /