Serhiy Storchaka added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16042>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to