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 Claudiu.Popa
Recipients Claudiu.Popa
Date 2014-06-02.14:55:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

I noticed that test_smtplib raises a ResourceWarning, tracking this to this piece of code:

   self.assertRaises(smtplib.SMTPResponseException, smtplib.SMTP,
                     HOST, self.port, 'localhost', 3)

What happens is that `SMTP.getreply` is called in `SMTP.__init__` after the socket was opened, but if getreply raises SMTPResponseException, the socket remains opened. The attached patch fixes this.
Date User Action Args
2014-06-02 14:55:42Claudiu.Popasetrecipients: + Claudiu.Popa
2014-06-02 14:55:42Claudiu.Popasetmessageid: <>
2014-06-02 14:55:42Claudiu.Popalinkissue21641 messages
2014-06-02 14:55:42Claudiu.Popacreate