mercurial/dispatch.py
changeset 24163 bb11081562d7
parent 24039 2ee35b6ee4fb
parent 24152 97a548aeb749
child 24221 4e240d6ab898
--- a/mercurial/dispatch.py	Sat Feb 28 01:12:54 2015 -0500
+++ b/mercurial/dispatch.py	Mon Mar 02 01:20:14 2015 -0600
@@ -227,6 +227,9 @@
             except (AttributeError, IndexError):
                 # it might be anything, for example a string
                 reason = inst.reason
+            if isinstance(reason, unicode):
+                # SSLError of Python 2.7.9 contains a unicode
+                reason = reason.encode(encoding.encoding, 'replace')
             ui.warn(_("abort: error: %s\n") % reason)
         elif (util.safehasattr(inst, "args")
               and inst.args and inst.args[0] == errno.EPIPE):