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)