Mercurial > public > mercurial-scm > hg-stable
diff mercurial/mail.py @ 4096:49237d6ae97d
merge with crew-stable
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Fri, 16 Feb 2007 05:27:37 -0200 |
parents | ba45041827a2 669f99f78db0 |
children | a11e13d50645 |
line wrap: on
line diff
--- a/mercurial/mail.py Thu Feb 15 10:15:08 2007 -0200 +++ b/mercurial/mail.py Fri Feb 16 05:27:37 2007 -0200 @@ -6,7 +6,7 @@ # of the GNU General Public License, incorporated herein by reference. from i18n import _ -import os, smtplib, templater, util +import os, smtplib, templater, util, socket def _smtp(ui): '''send mail using smtp.''' @@ -21,6 +21,9 @@ (mailhost, mailport)) s.connect(host=mailhost, port=mailport) if ui.configbool('smtp', 'tls'): + if not hasattr(socket, 'ssl'): + raise util.Abort(_("can't use TLS: Python SSL support " + "not installed")) ui.note(_('(using tls)\n')) s.ehlo() s.starttls()