runtime.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:cb-defense-splunk-app 作者: carbonblack 项目源码 文件源码
def _render_error(template, context, error):
    if template.error_handler:
        result = template.error_handler(context, error)
        if not result:
            compat.reraise(*sys.exc_info())
    else:
        error_template = exceptions.html_error_template()
        if context._outputting_as_unicode:
            context._buffer_stack[:] = [
                util.FastEncodingBuffer(as_unicode=True)]
        else:
            context._buffer_stack[:] = [util.FastEncodingBuffer(
                error_template.output_encoding,
                error_template.encoding_errors)]

        context._set_with_template(error_template)
        error_template.render_context(context, error=error)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号