Mercurial > hg
changeset 14965:194b043dfa51
mail: use safehasattr instead of hasattr
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 25 Jul 2011 16:02:15 -0500 |
parents | 376c32a5ccdc |
children | 0588fb0e2e8d |
files | mercurial/mail.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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'))