exceptions.py 文件源码

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

项目:zanph 作者: zanph 项目源码 文件源码
def get_response(self, environ=None):
        """Get a response object.  If one was passed to the exception
        it's returned directly.

        :param environ: the optional environ for the request.  This
                        can be used to modify the response depending
                        on how the request looked like.
        :return: a :class:`Response` object or a subclass thereof.
        """
        if self.response is not None:
            return self.response
        if environ is not None:
            environ = _get_environ(environ)
        headers = self.get_headers(environ)
        return Response(self.get_body(environ), self.code, headers)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号