This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author stranger4good
Recipients stranger4good
Date 2008-02-14.22:23:11
SpamBayes Score 0.20385364
Marked as misclassified No
Message-id <1203027793.14.0.279031432545.issue2118@psf.upfronthosting.co.za>
In-reply-to
Content
smtplib.SMTP() raises socket.error rather than SMTPConnectError

just try this on a non-responding address

>>> srv=smtplib.SMTP('192.168.13.22')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "c:\python25\lib\smtplib.py", line 244, in __init__
    (code, msg) = self.connect(host, port)
  File "c:\python25\lib\smtplib.py", line 311, in connect
    (code, msg) = self.getreply()
  File "c:\python25\lib\smtplib.py", line 352, in getreply
    line = self.file.readline()
  File "C:\Python25\lib\socket.py", line 346, in readline
    data = self._sock.recv(self._rbufsize)
socket.error: (10054, 'Connection reset by peer')
History
Date User Action Args
2008-02-14 22:23:13stranger4goodsetspambayes_score: 0.203854 -> 0.20385364
recipients: + stranger4good
2008-02-14 22:23:13stranger4goodsetspambayes_score: 0.203854 -> 0.203854
messageid: <1203027793.14.0.279031432545.issue2118@psf.upfronthosting.co.za>
2008-02-14 22:23:12stranger4goodlinkissue2118 messages
2008-02-14 22:23:11stranger4goodcreate