wsgiheaders: make sure __repr__() returns a string
When printing `req.headers` on the server side to debug, it complained that '%b'
needed to take a string, not bytes. Changing '%s' to '%r' caused it to complain
that __repr__ didn't return a string.
--- a/mercurial/hgweb/wsgiheaders.py Tue Feb 05 13:32:39 2019 -0500
+++ b/mercurial/hgweb/wsgiheaders.py Tue Feb 05 16:16:14 2019 -0500
@@ -127,7 +127,7 @@
return self._headers[:]
def __repr__(self):
- return "%s(%r)" % (self.__class__.__name__, self._headers)
+ return r"%s(%r)" % (self.__class__.__name__, self._headers)
def __str__(self):
"""str() returns the formatted headers, complete with end line,