Patchwork D3343: hgweb: these strings should be sysstrs, not bytes

login
register
mail settings
Submitter phabricator
Date April 14, 2018, 4:31 a.m.
Message ID <differential-rev-PHID-DREV-dk3tqt3zevglorkr2d5s-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30967/
State Superseded
Headers show

Comments

phabricator - April 14, 2018, 4:31 a.m.
durin42 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/D3343

AFFECTED FILES
  mercurial/hgweb/common.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/hgweb/common.py b/mercurial/hgweb/common.py
--- a/mercurial/hgweb/common.py
+++ b/mercurial/hgweb/common.py
@@ -131,7 +131,8 @@ 
 
 def _statusmessage(code):
     responses = httpserver.basehttprequesthandler.responses
-    return responses.get(code, ('Error', 'Unknown error'))[0]
+    return pycompat.bytesurl(
+        responses.get(code, (r'Error', r'Unknown error'))[0])
 
 def statusmessage(code, message=None):
     return '%d %s' % (code, message or _statusmessage(code))