hgweb: these strings should be sysstrs, not bytes
authorAugie Fackler <augie@google.com>
Fri, 13 Apr 2018 21:01:17 -0400
changeset 37734 a1110db1e455
parent 37733 d43810fe52b0
child 37735 126998dcfb08
hgweb: these strings should be sysstrs, not bytes Differential Revision: https://phab.mercurial-scm.org/D3343
mercurial/hgweb/common.py
--- a/mercurial/hgweb/common.py	Fri Apr 13 21:22:05 2018 -0400
+++ b/mercurial/hgweb/common.py	Fri Apr 13 21:01:17 2018 -0400
@@ -133,7 +133,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))