sslutil: make messages for Python without certificate handling more helpful
authorMads Kiilerich <mads@kiilerich.com>
Sat, 18 Jun 2011 01:08:54 +0200
changeset 14667 8f12dac18d13
parent 14666 27b080aa880a
child 14668 2d6f1b2c6a82
sslutil: make messages for Python without certificate handling more helpful We now explain why there is no certificate to verify and do not give hints about cacerts when they can't be used anyway.
mercurial/sslutil.py
--- a/mercurial/sslutil.py	Sat Jun 18 01:03:03 2011 +0200
+++ b/mercurial/sslutil.py	Sat Jun 18 01:08:54 2011 +0200
@@ -122,8 +122,7 @@
                                  (host, nicefingerprint))
             else: # python 2.5 ?
                 if hostfingerprint:
-                    raise util.Abort(_('no certificate for %s with '
-                                       'configured hostfingerprint') % host)
-                self.ui.warn(_('warning: %s certificate not verified '
-                               '(check web.cacerts config setting)\n') %
-                             host)
+                    raise util.Abort(_("host fingerprint for %s can't be "
+                                       "verified (Python too old)") % host)
+                self.ui.warn(_("warning: certificate for %s can't be "
+                               "verified (Python too old)\n") % host)