core.py 文件源码

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

项目:deb-python-httpretty 作者: openstack 项目源码 文件源码
def debug(self, truesock_func, *a, **kw):
            if self.is_http:
                frame = inspect.stack()[0][0]
                lines = list(map(utf8, traceback.format_stack(frame)))

                message = [
                    "HTTPretty intercepted and unexpected socket method call.",
                    ("Please open an issue at "
                     "'https://github.com/gabrielfalcao/HTTPretty/issues'"),
                    "And paste the following traceback:\n",
                    "".join(decode_utf8(lines)),
                ]
                raise RuntimeError("\n".join(message))
            if not self.truesock:
                raise UnmockedError()
            return getattr(self.truesock, truesock_func)(*a, **kw)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号