sslutil: use a dict for hanging hg state off the wrapped socket
I plan on introducing more state on the socket instance. Instead
of using multiple variables, let's just use one to minimize risk
of name collision.
--- a/mercurial/sslutil.py Thu May 05 19:10:18 2016 -0700
+++ b/mercurial/sslutil.py Sun May 15 11:25:07 2016 -0700
@@ -171,7 +171,9 @@
if not sslsocket.cipher():
raise error.Abort(_('ssl connection failed'))
- sslsocket._hgcaloaded = caloaded
+ sslsocket._hgstate = {
+ 'caloaded': caloaded,
+ }
return sslsocket
@@ -341,7 +343,7 @@
(host, nicefingerprint))
return
- if not sock._hgcaloaded:
+ if not sock._hgstate['caloaded']:
if strict:
raise error.Abort(_('%s certificate with fingerprint %s not '
'verified') % (host, nicefingerprint),