From: Georg Brandl Date: Tue, 30 Sep 2014 14:31:21 +0000 (+0200) Subject: Fix-up for 0f362676460d: add missing size argument to SSLFakeFile.readline(), as... X-Git-Tag: v3.2.6rc1~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=786c8e7dd565aecafb020683705564c42e62fedc;p=thirdparty%2FPython%2Fcpython.git Fix-up for 0f362676460d: add missing size argument to SSLFakeFile.readline(), as in 2.6 backport 8a6def3add5b --- diff --git a/Lib/smtplib.py b/Lib/smtplib.py old mode 100644 new mode 100755 index b03533e1f703..cb36d2869e3f --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -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