Commit 377406a3 authored by Georg Brandl's avatar Georg Brandl

Fix-up for 0f362676460d: add missing size argument to SSLFakeFile.readline(),...

Fix-up for 0f362676460d: add missing size argument to SSLFakeFile.readline(), as in 2.6 backport 8a6def3add5b
parent ac25affb
...@@ -189,10 +189,14 @@ else: ...@@ -189,10 +189,14 @@ else:
def __init__(self, sslobj): def __init__(self, sslobj):
self.sslobj = sslobj self.sslobj = sslobj
def readline(self): def readline(self, size=-1):
if size < 0:
size = None
str = b"" str = b""
chr = None chr = None
while chr != b"\n": while chr != b"\n":
if size is not None and len(str) > size:
break
chr = self.sslobj.read(1) chr = self.sslobj.read(1)
if not chr: if not chr:
break break
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment