##// END OF EJS Templates
sslutil: use raw strings for exception reason compare...
Gregory Szorc -
r41455:0d226b21 default
parent child Browse files
Show More
@@ -430,6 +430,7 b' def wrapsocket(sock, keyfile, certfile, '
430 430 'error)\n'))
431 431 except ssl.SSLError:
432 432 pass
433
433 434 # Try to print more helpful error messages for known failures.
434 435 if util.safehasattr(e, 'reason'):
435 436 # This error occurs when the client and server don't share a
@@ -437,7 +438,7 b' def wrapsocket(sock, keyfile, certfile, '
437 438 # outright. Hopefully the reason for this error is that we require
438 439 # TLS 1.1+ and the server only supports TLS 1.0. Whatever the
439 440 # reason, try to emit an actionable warning.
440 if e.reason == 'UNSUPPORTED_PROTOCOL':
441 if e.reason == r'UNSUPPORTED_PROTOCOL':
441 442 # We attempted TLS 1.0+.
442 443 if settings['protocolui'] == 'tls1.0':
443 444 # We support more than just TLS 1.0+. If this happens,
@@ -484,7 +485,7 b' def wrapsocket(sock, keyfile, certfile, '
484 485 '(see https://mercurial-scm.org/wiki/SecureConnections '
485 486 'for more info)\n'))
486 487
487 elif (e.reason == 'CERTIFICATE_VERIFY_FAILED' and
488 elif (e.reason == r'CERTIFICATE_VERIFY_FAILED' and
488 489 pycompat.iswindows):
489 490
490 491 ui.warn(_('(the full certificate chain may not be available '
General Comments 0
You need to be logged in to leave comments. Login now