Skip to content

Commit 6ceca4e

Browse files
committed
#20903: clarify what happens when an smtp connection timeout occurs.
Patch by Milan Oberkirch.
1 parent f10063e commit 6ceca4e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Doc/library/smtplib.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
3232
than a success code, an :exc:`SMTPConnectError` is raised. The optional
3333
*timeout* parameter specifies a timeout in seconds for blocking operations
3434
like the connection attempt (if not specified, the global default timeout
35-
setting will be used). The optional source_address parameter allows to bind
35+
setting will be used). If the timeout expires, :exc:`socket.timeout` is
36+
raised. The optional source_address parameter allows to bind
3637
to some specific source address in a machine with multiple network
3738
interfaces, and/or to some specific source TCP port. It takes a 2-tuple
3839
(host, port), for the socket to bind to as its source address before

0 commit comments

Comments
 (0)