simple_httpclient.py 文件源码

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

项目:get_started_with_respeaker 作者: respeaker 项目源码 文件源码
def _handle_exception(self, typ, value, tb):
        if self.final_callback:
            self._remove_timeout()
            gen_log.warning("uncaught exception", exc_info=(typ, value, tb))
            self._run_callback(HTTPResponse(self.request, 599, error=value,
                                            request_time=self.io_loop.time() - self.start_time,
                                            ))

            if hasattr(self, "stream"):
                self.stream.close()
            return True
        else:
            # If our callback has already been called, we are probably
            # catching an exception that is not caused by us but rather
            # some child of our callback. Rather than drop it on the floor,
            # pass it along.
            return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号