mirror of
https://github.com/python/cpython.git
synced 2025-11-26 13:22:51 +00:00
Fix-up for 0f362676460d: add missing size argument to SSLFakeFile.readline(), as in 2.6 backport 8a6def3add5b
This commit is contained in:
parent
e558181660
commit
786c8e7dd5
1 changed files with 5 additions and 1 deletions
6
Lib/smtplib.py
Normal file → Executable file
6
Lib/smtplib.py
Normal file → Executable file
|
|
@ -189,10 +189,14 @@ else:
|
|||
def __init__(self, sslobj):
|
||||
self.sslobj = sslobj
|
||||
|
||||
def readline(self):
|
||||
def readline(self, size=-1):
|
||||
if size < 0:
|
||||
size = None
|
||||
str = b""
|
||||
chr = None
|
||||
while chr != b"\n":
|
||||
if size is not None and len(str) > size:
|
||||
break
|
||||
chr = self.sslobj.read(1)
|
||||
if not chr:
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue