[PATCH 2 of 2] sslutil: Only emit debug log messages accessing https repo on python2.4+2.5

Mads Kiilerich mads at kiilerich.com
Tue Jun 14 23:29:49 UTC 2011


Matt Mackall wrote, On 06/14/2011 10:07 PM:
>>> diff --git a/mercurial/sslutil.py b/mercurial/sslutil.py
>>> --- a/mercurial/sslutil.py
>>> +++ b/mercurial/sslutil.py
>> ...
>>> -            else: # python 2.5 ?
>>> -                if hostfingerprint:
>>> -                    raise util.Abort(_('no certificate for %s with '
>>> -                                       'configured hostfingerprint') % host)
>> A simple solution could be to change this message to something like
>> "configured hostfingerprint for %s can't be verified because of missing
>> Python SSL capabilities" ... only shorter.
> "host fingerprint for %s can't be verified (upgrade Python)"?

Users on these old Pythons are probably in a situation where upgrading 
Python isn't an option, so it might be a bad advice that annoys them so 
much that they miss the point. But I think this is the best suggestion 
we have seen so far.

>>> -                self.ui.warn(_('warning: %s certificate not verified '
>>> -                               '(check web.cacerts config setting)\n') %
>>> -                             host)
>> And this one could be "warning: %s certificate for %s can't be verified
>> because of missing Python SSL capabilities'.

This one will be shown very often for all the users that just has to 
live with the problem. "warning: certificate for %s can't be verified 
(upgrade Python)"? This is where the advice starts to make the annoying 
message even more annoying. So be it.

/Mads





More information about the Mercurial-devel mailing list