# HG changeset patch # User Gregory Szorc # Date 2016-07-02 16:41:40 # Node ID a7d1532b26a17bbaace43124cd415dcb709b08e2 # Parent ddbff1435e7baf66efc67c4d2a733f8035cd53d8 sslutil: don't access message attribute in exception (issue5285) I should have ran the entire test suite on Python 2.6. Since the hostname matching tests are implemented in Python (not .t tests), it didn't uncover this warning. I'm not sure why - warnings should be printed regardless. This is possibly a bug in the test runner. But that's for another day... diff --git a/mercurial/sslutil.py b/mercurial/sslutil.py --- a/mercurial/sslutil.py +++ b/mercurial/sslutil.py @@ -236,7 +236,7 @@ def _verifycert(cert, hostname): if _dnsnamematch(value, hostname): return except wildcarderror as e: - return e.message + return e.args[0] dnsnames.append(value) @@ -257,7 +257,7 @@ def _verifycert(cert, hostname): if _dnsnamematch(value, hostname): return except wildcarderror as e: - return e.message + return e.args[0] dnsnames.append(value)