Patchwork D7195: py3: fix exception message encoding in infinitepush

login
register
mail settings
Submitter phabricator
Date Nov. 1, 2019, 4:47 p.m.
Message ID <differential-rev-PHID-DREV-lpzzj3cimqhzgcv5mwpf-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42660/
State Superseded
Headers show

Comments

phabricator - Nov. 1, 2019, 4:47 p.m.
touilleMan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/infinitepush/__init__.py

CHANGE DETAILS




To: touilleMan, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/infinitepush/__init__.py b/hgext/infinitepush/__init__.py
--- a/hgext/infinitepush/__init__.py
+++ b/hgext/infinitepush/__init__.py
@@ -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: