This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4c71a26a4009: sslutil: some more forcebytes() on some 
exception messages (authored by durin42, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D2690?vs=6649&id=6667#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2690?vs=6649&id=6667

REVISION DETAIL
  https://phab.mercurial-scm.org/D2690

AFFECTED FILES
  mercurial/sslutil.py

CHANGE DETAILS

diff --git a/mercurial/sslutil.py b/mercurial/sslutil.py
--- a/mercurial/sslutil.py
+++ b/mercurial/sslutil.py
@@ -346,10 +346,11 @@
 
     for f in (keyfile, certfile):
         if f and not os.path.exists(f):
-            raise error.Abort(_('certificate file (%s) does not exist; '
-                                'cannot connect to %s') % (f, serverhostname),
-                              hint=_('restore missing file or fix references '
-                                     'in Mercurial config'))
+            raise error.Abort(
+                _('certificate file (%s) does not exist; cannot connect to %s')
+                % (f, pycompat.bytesurl(serverhostname)),
+                hint=_('restore missing file or fix references '
+                       'in Mercurial config'))
 
     settings = _hostsettings(ui, serverhostname)
 
@@ -372,9 +373,10 @@
         try:
             sslcontext.set_ciphers(pycompat.sysstr(settings['ciphers']))
         except ssl.SSLError as e:
-            raise error.Abort(_('could not set ciphers: %s') % e.args[0],
-                              hint=_('change cipher string (%s) in config') %
-                                   settings['ciphers'])
+            raise error.Abort(
+                _('could not set ciphers: %s') % util.forcebytestr(e.args[0]),
+                hint=_('change cipher string (%s) in config') %
+                settings['ciphers'])
 
     if certfile is not None:
         def password():



To: durin42, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to