On 2019/11/04 8:16, Nathan Hartman wrote:
On Sun, Nov 3, 2019 at 12:56 AM Nathan Hartman <hartman.nat...@gmail.com>
wrote:

It seems there's another problem.

Apparently the 'raise .. from' construct is Python 3+. Which means
this breaks the mailer for Python 2.7. I found this when I tested on
Python 2.7 earlier and the script terminated with a syntax error at
'raise MessageSendFailure from detail'.

Which do you think is better:

Remove the 'from detail' and lose the original cause of
MessageSendFailure. MessageSendFailure is meant to be handled and
ignored (possibly only used for outputting additional logging),
allowing the mailer to continue mailing, so this might be acceptable.

Or, alternately:

Check which version of Python is running, use 'from detail' only when
Python 3+.

The latter can't accomplish with only single script, because syntax
error occurs on parse on loading, not on execution. To hide
'from detail' from Python 2 interpreter, we should get it out of
the script.

(The hunk arround server.quit() looks good to me.)

Cheers,
--
Yasuhito FUTATSUKI <futat...@yf.bsdclub.org>/<futat...@poem.co.jp>

Reply via email to