[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Issue tracker housecleaning: SVN-1804

From: Yasuhito FUTATSUKI <futatuki_at_poem.co.jp>
Date: Sat, 2 Nov 2019 17:00:26 +0900

It's too late, but it is a bit pity....

On 2019/10/30 0:11, Nathan Hartman wrote:

> After incorporating all the preceding feedback, the function is
> considerably longer, but we handle and report errors:
> > [[[> def finish(self):


> finally:
> server.quit()
> ]]]

As I mentioned before (but I couldn't tell what I want, sorry),
smtplib.SMTP.quit() can raise exception. If server.quit() in finally
block has raised an exception and it isn't caught, it will overwrite
the exception raised in try block or re-raised in exception block.

The exception on server.quit() itself doesn't affect the result that
we could send message or not, and there is nothing we can do more
about this SMTP session. So we can catch it, then safely ignore it or
at most log its cause as warning, and continue the transaction.
Even if the cause of exception is fatal, It doesn't directly affect next
attempt to send message.


Yasuhito FUTATSUKI <futatuki_at_yf.bsdclub.org>/<futatuki_at_poem.co.jp>
Received on 2019-11-02 09:00:44 CET

This is an archived mail posted to the Subversion Dev mailing list.