# HG changeset patch # User Gregory Szorc # Date 1463336707 25200 # Node ID b115eed11780f778aa051cf75567225148a9c7e5 # Parent 7424f429419987706559aa67d81d337f560961df 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. diff -r 7424f4294199 -r b115eed11780 mercurial/sslutil.py --- 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),