D4733: py3: cast exception to bytes

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Tue Sep 25 21:59:19 EDT 2018


indygreg updated this revision to Diff 11361.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4733?vs=11350&id=11361

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

AFFECTED FILES
  mercurial/wireprotoframing.py

CHANGE DETAILS

diff --git a/mercurial/wireprotoframing.py b/mercurial/wireprotoframing.py
--- a/mercurial/wireprotoframing.py
+++ b/mercurial/wireprotoframing.py
@@ -827,9 +827,10 @@
                     break
 
                 except Exception as e:
-                    for frame in createerrorframe(stream, requestid,
-                                                  '%s' % e,
-                                                  errtype='server'):
+                    for frame in createerrorframe(
+                        stream, requestid, '%s' % stringutil.forcebytestr(e),
+                        errtype='server'):
+
                         yield frame
 
                     break



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


More information about the Mercurial-devel mailing list