py3: fix exception message encoding in infinitepush stable
authorEmmanuel Leblond <emmanuel.leblond@gmail.com>
Fri, 01 Nov 2019 17:39:17 +0100
branchstable
changeset 43363 2ded39ef5bf7
parent 43362 ddfd0f3956f4
child 43364 dd64e229c46b
py3: fix exception message encoding in infinitepush Differential Revision: https://phab.mercurial-scm.org/D7195
hgext/infinitepush/__init__.py
--- a/hgext/infinitepush/__init__.py	Fri Nov 01 10:57:31 2019 -0700
+++ b/hgext/infinitepush/__init__.py	Fri Nov 01 17:39:17 2019 +0100
@@ -959,7 +959,7 @@
             service,
             eventtype=b'failure',
             elapsedms=(time.time() - start) * 1000,
-            errormsg=str(e),
+            errormsg=stringutil.forcebytestr(e),
             **kwargs
         )
         raise
@@ -1223,7 +1223,7 @@
             scratchbranchparttype,
             eventtype=b'failure',
             elapsedms=(time.time() - parthandlerstart) * 1000,
-            errormsg=str(e),
+            errormsg=stringutil.forcebytestr(e),
         )
         raise
     finally: