Message197788
| Author |
serhiy.storchaka |
| Recipients |
Arfrever, akuchling, barry, benjamin.peterson, christian.heimes, georg.brandl, giampaolo.rodola, larry, r.david.murray, serhiy.storchaka |
| Date |
2013年09月15日.16:47:33 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1379263653.25.0.722698801999.issue16042@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
It is not important in the context of this issue, but readline(0) is blocked and returns 1-character string. Move the length check above self.sslobj.read(1). For readability you can also move the chr != "\n" inside the loop:
while size is None or len(str) < size:
chr = self.sslobj.read(1)
if not chr or chr == "\n": break
str += chr |
|