Fix accidental cast to byte string under Python 2

While grepping for calls to str(), I found this bit which looks like a
cast to unicode was intended under Python 2.
This commit is contained in:
Maik Hoepfel 2017-02-09 15:28:58 +01:00
parent c2baa32a9c
commit a3944eff5e

View File

@ -269,7 +269,7 @@ class WebRequest(http.Request):
(b"Content-Type", b"text/html; charset=utf-8"), (b"Content-Type", b"text/html; charset=utf-8"),
], ],
"content": (self.error_template % { "content": (self.error_template % {
"title": str(status) + " " + status_text.decode("ascii"), "title": six.text_type(status) + " " + status_text.decode("ascii"),
"body": body, "body": body,
}).encode("utf8"), }).encode("utf8"),
}) })