mercurial/wireprotov2server.py
changeset 39837 69b4a5b89dc5
parent 39828 3ed53b071041
child 39864 7b752bf08435
--- a/mercurial/wireprotov2server.py	Tue Sep 25 23:25:36 2018 -0400
+++ b/mercurial/wireprotov2server.py	Tue Sep 25 09:11:56 2018 -0700
@@ -29,6 +29,7 @@
 )
 from .utils import (
     interfaceutil,
+    stringutil,
 )
 
 FRAMINGTYPE = b'application/mercurial-exp-framing-0005'
@@ -319,7 +320,8 @@
     except Exception as e:
         action, meta = reactor.onservererror(
             outstream, command['requestid'],
-            _('exception when invoking command: %s') % e)
+            _('exception when invoking command: %s') %
+            stringutil.forcebytestr(e))
 
     if action == 'sendframes':
         res.setbodygen(meta['framegen'])