context.py 文件源码

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

项目:ovirtcmd 作者: fbacchella 项目源码 文件源码
def resolve_service_href(self, href):
        absolute_href = urljoin(self.api.url, href)

        # The first replace remove the root of ovirt location
        # The second replace is to remove the first / in the path
        # The str ensure that service_path is a str, not a unicode in python 2
        service_path = str(absolute_href.replace(self.api.url, "").replace("/", "", 1))

        new_service = self.api.service(service_path)
        return new_service
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号