[Python-checkins] cpython (merge 3.4 -> default): merge from 3.4

senthil.kumaran python-checkins at python.org
Tue Jun 3 16:25:50 CEST 2014


http://hg.python.org/cpython/rev/7ea84a25d863
changeset: 90994:7ea84a25d863
parent: 90992:50c9df76bb77
parent: 90993:d5c76646168d
user: Senthil Kumaran <senthil at uthcode.com>
date: Tue Jun 03 07:25:40 2014 -0700
summary:
 merge from 3.4
Fix issue #21641: Close the socket before raising the SMTPResponseException. Fixes the ResourceWarning in the test run.
Patch by Claudiu.Popa.
files:
 Lib/smtplib.py | 1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -377,6 +377,7 @@
 if self.debuglevel > 0:
 print('reply:', repr(line), file=stderr)
 if len(line) > _MAXLINE:
+ self.close()
 raise SMTPResponseException(500, "Line too long.")
 resp.append(line[4:].strip(b' \t\r\n'))
 code = line[:3]
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /