diff mercurial/hgweb/request.py @ 36258:af0a19d8812b

py3: get bytes-repr of network errors portably This resolves a lot of weird issues in Python 3 around error strings. Differential Revision: https://phab.mercurial-scm.org/D2295
author Augie Fackler <augie@google.com>
date Sat, 17 Feb 2018 01:11:48 -0500
parents a0a004b29a51
children 2442927cdd96
line wrap: on
line diff
--- a/mercurial/hgweb/request.py	Sat Feb 17 01:09:56 2018 -0500
+++ b/mercurial/hgweb/request.py	Sat Feb 17 01:11:48 2018 -0500
@@ -121,7 +121,8 @@
             elif isinstance(status, int):
                 status = statusmessage(status)
 
-            self.server_write = self._start_response(status, self.headers)
+            self.server_write = self._start_response(
+                pycompat.sysstr(status), self.headers)
             self._start_response = None
             self.headers = []
         if body is not None: