Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:

Please remove the old smtplib.patch: it is confusing to have two 
attachments with the same name.  It will still be available in the 
history, so nothing will be lost.

A nit-pick: 221 is a success code (in smtp 2xx codes are successes and 
5xx are errors IIRC), so vars should be simply 'code' (or 'rc' for 
return code) and 'msg', not 'errcode' and 'errmsg'.

Your new code may leave socket open in the case when self.docmd("quit") 
raises an exception other than SMTPServerDisconnected.

BTW, I think your code will be simpler if you don't reuse quit() and 
simply call docmd("quit") and close()directly in an appropriate 
try/except/finally statement.

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4972>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to