«Unknown exception encountered»
Matt Mackall
mpm at selenic.com
Fri Apr 5 17:15:17 UTC 2013
On Fri, 2013-04-05 at 17:35 +0200, Tony Mechelynck wrote:
> On 05/04/13 15:20, Adrian Klaver wrote:
> [...]
> > 2) The error looks below looks to me like a network error, somewhat
> > confirmed by success on retry.
> [...]
>
> In that case, I suppose there isn't much to do on Mercurial's side,
> unless this kind of error can be identified in order to give the user a
> meaningful message and a choice between "retry" and "abort" rather than
> an uncaught exception with an awful lot of messages that look like a
> mixture of Hebrew and Chinese to any nontechnical user.
Who are these nontechnical users who are downloading the source for
Vim?
This seems to be another instance of
http://bugs.python.org/issue13721
..with slightly different timing. Perhaps this will fix it:
diff -r f63035b9b38a mercurial/sslutil.py
--- a/mercurial/sslutil.py Thu Apr 04 16:37:37 2013 -0500
+++ b/mercurial/sslutil.py Fri Apr 05 12:14:16 2013 -0500
@@ -111,9 +111,15 @@
self.ui.warn(_("warning: certificate for %s can't be verified "
"(Python too old)\n") % host)
return
+
if not sock.cipher(): # work around http://bugs.python.org/issue13721
raise util.Abort(_('%s ssl connection error') % host)
- peercert = sock.getpeercert(True)
+ try:
+ peercert = sock.getpeercert(True)
+ peercert2 = sock.getpeercert()
+ except AttributeError:
+ raise util.Abort(_('%s ssl connection error') % host)
+
if not peercert:
raise util.Abort(_('%s certificate error: '
'no certificate received') % host)
@@ -129,7 +135,7 @@
self.ui.debug('%s certificate matched fingerprint %s\n' %
(host, nicefingerprint))
elif cacerts:
- msg = _verifycert(sock.getpeercert(), host)
+ msg = _verifycert(peercert2, host)
if msg:
raise util.Abort(_('%s certificate error: %s') % (host, msg),
hint=_('configure hostfingerprint %s or use '
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list