comparison mercurial/hgweb/common.py @ 37734:a1110db1e455

hgweb: these strings should be sysstrs, not bytes Differential Revision: https://phab.mercurial-scm.org/D3343
author Augie Fackler <augie@google.com>
date Fri, 13 Apr 2018 21:01:17 -0400
parents 31a0d47d69b3
children 9310037f0636
comparison
equal deleted inserted replaced
37733:d43810fe52b0 37734:a1110db1e455
131 return getattr(self.f, attr) 131 return getattr(self.f, attr)
132 raise AttributeError 132 raise AttributeError
133 133
134 def _statusmessage(code): 134 def _statusmessage(code):
135 responses = httpserver.basehttprequesthandler.responses 135 responses = httpserver.basehttprequesthandler.responses
136 return responses.get(code, ('Error', 'Unknown error'))[0] 136 return pycompat.bytesurl(
137 responses.get(code, (r'Error', r'Unknown error'))[0])
137 138
138 def statusmessage(code, message=None): 139 def statusmessage(code, message=None):
139 return '%d %s' % (code, message or _statusmessage(code)) 140 return '%d %s' % (code, message or _statusmessage(code))
140 141
141 def get_stat(spath, fn): 142 def get_stat(spath, fn):