summaryrefslogtreecommitdiffstats
path: root/Lib/smtplib.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-04-13 18:40:33 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-04-13 18:40:33 (GMT)
commit14ee3cf244aad69d138159cf70715eedb95ce00f (patch)
tree44f57d38085300318b1471abc160b9f68e11f686 /Lib/smtplib.py
parent4bb17348f5507f42f62d15b16ca0672e802f619c (diff)
downloadcpython-14ee3cf244aad69d138159cf70715eedb95ce00f.zip
cpython-14ee3cf244aad69d138159cf70715eedb95ce00f.tar.gz
cpython-14ee3cf244aad69d138159cf70715eedb95ce00f.tar.bz2
#2118: clarify smtplib exception documentation.
Diffstat (limited to 'Lib/smtplib.py')
-rw-r--r--Lib/smtplib.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index 562a182..f2c8452 100644
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -221,8 +221,9 @@ class SMTP:
If specified, `host' is the name of the remote host to which to
connect. If specified, `port' specifies the port to which to connect.
- By default, smtplib.SMTP_PORT is used. An SMTPConnectError is raised
- if the specified `host' doesn't respond correctly. If specified,
+ By default, smtplib.SMTP_PORT is used. If a host is specified the
+ connect method is called, and if it returns anything other than
+ a success code an SMTPConnectError is raised. If specified,
`local_hostname` is used as the FQDN of the local host. By default,
the local hostname is found using socket.getfqdn(). The
`source_address` parameter takes a 2-tuple (host, port) for the socket