Mercurial > hg-stable
changeset 41601:765a608c2108
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.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 05 Feb 2019 16:16:14 -0500 |
parents | ccaa52865fac |
children | 46432c04f010 |
files | mercurial/hgweb/wsgiheaders.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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,