Mercurial > public > mercurial-scm > hg-stable
diff mercurial/mail.py @ 14965:194b043dfa51
mail: use safehasattr instead of hasattr
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 25 Jul 2011 16:02:15 -0500 |
parents | 4030630fb59c |
children | cc58c228503e |
line wrap: on
line diff
--- a/mercurial/mail.py Mon Jul 25 15:55:51 2011 -0500 +++ b/mercurial/mail.py Mon Jul 25 16:02:15 2011 -0500 @@ -37,7 +37,7 @@ # backward compatible: when tls = true, we use starttls. starttls = tls == 'starttls' or util.parsebool(tls) smtps = tls == 'smtps' - if (starttls or smtps) and not hasattr(socket, 'ssl'): + if (starttls or smtps) and not util.safehasattr(socket, 'ssl'): raise util.Abort(_("can't use TLS: Python SSL support not installed")) if smtps: ui.note(_('(using smtps)\n'))