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...
--- a/mercurial/sslutil.py Fri Jul 01 15:12:33 2016 -0500
+++ b/mercurial/sslutil.py Sat Jul 02 09:41:40 2016 -0700
@@ -236,7 +236,7 @@
if _dnsnamematch(value, hostname):
return
except wildcarderror as e:
- return e.message
+ return e.args[0]
dnsnames.append(value)
@@ -257,7 +257,7 @@
if _dnsnamematch(value, hostname):
return
except wildcarderror as e:
- return e.message
+ return e.args[0]
dnsnames.append(value)