]> granicus.if.org Git - python/commitdiff
#20903: clarify what happens when an smtp connection timeout occurs.
authorR David Murray <rdmurray@bitdance.com>
Mon, 9 Jun 2014 20:40:47 +0000 (16:40 -0400)
committerR David Murray <rdmurray@bitdance.com>
Mon, 9 Jun 2014 20:40:47 +0000 (16:40 -0400)
Patch by Milan Oberkirch.

Doc/library/smtplib.rst

index e145659f62eae7d28a965d96cab9aecb0b9d1bb7..5b2808d41ee05d68d158f26bf0d300a13ea1fa5a 100644 (file)
@@ -32,7 +32,8 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
    than a success code, an :exc:`SMTPConnectError` is raised. The optional
    *timeout* parameter specifies a timeout in seconds for blocking operations
    like the connection attempt (if not specified, the global default timeout
-   setting will be used).
+   setting will be used).  If the timeout expires, :exc:`socket.timeout`
+   is raised.
 
    For normal use, you should only require the initialization/connect,
    :meth:`sendmail`, and :meth:`~smtplib.quit` methods.
@@ -54,7 +55,8 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
    formatted private key and certificate chain file for the SSL connection. The
    optional *timeout* parameter specifies a timeout in seconds for blocking
    operations like the connection attempt (if not specified, the global default
-   timeout setting will be used).
+   timeout setting will be used).  If the timeout expires, :exc:`socket.timeout`
+   is raised.
 
    .. versionadded:: 2.6