diff tests/hghave.py @ 29107:c8fbfb9163ce

sslutil: move code examining _canloaddefaultcerts out of _defaultcacerts Before, the return of _defaultcacerts() was 1 of 3 types. This was difficult to read. Make it return a path or None. We had to update hghave.py in the same patch because it was also looking at this internal function. I wasted dozens of minutes trying to figure out why tests were failing until I found the code in hghave.py...
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 04 May 2016 23:38:34 -0700
parents 67fd250b7c21
children 47eab0cb72e3
line wrap: on
line diff
--- a/tests/hghave.py	Wed May 04 23:01:49 2016 -0700
+++ b/tests/hghave.py	Wed May 04 23:38:34 2016 -0700
@@ -416,7 +416,7 @@
 @check("defaultcacerts", "can verify SSL certs by system's CA certs store")
 def has_defaultcacerts():
     from mercurial import sslutil
-    return sslutil._defaultcacerts() != '!'
+    return sslutil._defaultcacerts() or sslutil._canloaddefaultcerts
 
 @check("windows", "Windows")
 def has_windows():