mirror of https://github.com/python/cpython
#2248: return result of QUIT from quit().
This commit is contained in:
parent
6c052fd523
commit
deaf2cafbd
|
@ -318,7 +318,12 @@ An :class:`SMTP` instance has the following methods:
|
|||
|
||||
.. method:: SMTP.quit()
|
||||
|
||||
Terminate the SMTP session and close the connection.
|
||||
Terminate the SMTP session and close the connection. Return the result of
|
||||
the SMTP ``QUIT`` command.
|
||||
|
||||
.. versionchanged:: 2.6
|
||||
Return a value.
|
||||
|
||||
|
||||
Low-level methods corresponding to the standard SMTP/ESMTP commands ``HELP``,
|
||||
``RSET``, ``NOOP``, ``MAIL``, ``RCPT``, and ``DATA`` are also supported.
|
||||
|
|
|
@ -726,8 +726,9 @@ class SMTP:
|
|||
|
||||
def quit(self):
|
||||
"""Terminate the SMTP session."""
|
||||
self.docmd("quit")
|
||||
res = self.docmd("quit")
|
||||
self.close()
|
||||
return res
|
||||
|
||||
if _have_ssl:
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ What's New in Python 2.6 alpha 2?
|
|||
Core and builtins
|
||||
-----------------
|
||||
|
||||
- Patch #2477: Added from __future__ import unicode_literals
|
||||
- Patch #2477: Added from __future__ import unicode_literals.
|
||||
|
||||
- Added backport of bytearray type.
|
||||
|
||||
|
@ -76,6 +76,8 @@ Extensions Modules
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #2248: return the result of the QUIT command. from SMTP.quit().
|
||||
|
||||
- Backport of Python 3.0's io module.
|
||||
|
||||
- Issue #2482: Make sure that the coefficient of a Decimal is always
|
||||
|
|
Loading…
Reference in New Issue