# HG changeset patch # User Augie Fackler # Date 2018-06-13 00:43:56 # Node ID af0e88e64ede202ee7a058acf4f2a89ac86ec97d # Parent 9f499d28efb41fe3399914f07d30a54c3313eda3 hgweb: insist http_status value is a sysstr My previous change was extremely confusing to figure out, because I thought I was looking at a client-side problem. For the low cost of an isinstance assert, we can make those errors not happen in the future. Differential Revision: https://phab.mercurial-scm.org/D3727 diff --git a/mercurial/hgweb/server.py b/mercurial/hgweb/server.py --- a/mercurial/hgweb/server.py +++ b/mercurial/hgweb/server.py @@ -215,6 +215,7 @@ class _httprequesthandler(httpservermod. self.sent_headers = True def _start_response(self, http_status, headers, exc_info=None): + assert isinstance(http_status, str) code, msg = http_status.split(None, 1) code = int(code) self.saved_status = http_status