Mercurial > hg-stable
changeset 25463:03af5c2ddf75
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.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 07 Jun 2015 09:30:15 +0900 |
parents | 021e68d37c5b |
children | 504a1f295677 |
files | mercurial/mail.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)