mail: pass ui to sslutil.wrapsocket() even if verifycert is off (
issue4713)
21b536f01eda made 'ui' argument is passed via sslutil.sslkwargs(), but mailer
doesn't call sslkwargs() if smtp.verifycert is off. So we have to put it in
sslkwargs manually.
--- a/mercurial/mail.py Sat Jun 06 14:03:55 2015 +0200
+++ b/mercurial/mail.py Sun Jun 07 09:30:15 2015 +0900
@@ -104,7 +104,8 @@
if (starttls or smtps) and verifycert:
sslkwargs = sslutil.sslkwargs(ui, mailhost)
else:
- sslkwargs = {}
+ # 'ui' is required by sslutil.wrapsocket() and set by sslkwargs()
+ sslkwargs = {'ui': ui}
if smtps:
ui.note(_('(using smtps)\n'))
s = SMTPS(sslkwargs, local_hostname=local_hostname)