mercurial/wireprotov2server.py
branchstable
changeset 46697 71443f742886
parent 46062 14ff4929ca8c
child 46819 d4ba4d51f85f
--- a/mercurial/wireprotov2server.py	Thu Mar 11 21:02:03 2021 -0500
+++ b/mercurial/wireprotov2server.py	Thu Mar 11 21:07:04 2021 -0500
@@ -88,7 +88,9 @@
     try:
         checkperm(rctx, req, b'pull' if permission == b'ro' else b'push')
     except hgwebcommon.ErrorResponse as e:
-        res.status = hgwebcommon.statusmessage(e.code, pycompat.bytestr(e))
+        res.status = hgwebcommon.statusmessage(
+            e.code, stringutil.forcebytestr(e)
+        )
         for k, v in e.headers:
             res.headers[k] = v
         res.setbodybytes(b'permission denied')