text will be in a <pre> bloc

def send_error_msgtxt(self, code, message, headers=None):
        "text will be in a <pre> bloc"
        if headers is None:
            headers = {}

        if isinstance(message, (list, tuple)):
            message = ''.join(message)
        elif isinstance(message, dict):
            message = repr(message)

        self.send_error_explain(code,
                                ''.join(("<pre>\n", cgi.escape(message), "</pre>\n")),
                                headers,
                                "text/html")