Commits

Jason R. Coombs committed 1648a97

Fixed failure on Python 2 in cherrypy.test.test_json:JsonTest.test_json_input when the error message had unicode in it.

Comments (0)

Files changed (1)

         response.headers['Content-Type'] = "text/html;charset=utf-8"
         response.headers.pop('Content-Length', None)
 
-        content = ntob(self.get_error_page(self.status, traceback=tb,
-                                           message=self._message), 'utf-8')
+        content = self.get_error_page(self.status, traceback=tb,
+            message=self._message).encode('utf-8')
         response.body = content
 
         _be_ie_unfriendly(self.code)