library.py 文件源码

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

项目:loady 作者: timedata-org 项目源码 文件源码
def load(self):
        """Load the library."""
        if not git:
            raise EnvironmentError(MISSING_GIT_ERROR)

        if os.path.exists(self.path):
            if not config.CACHE_DISABLE:
                return
            shutil.rmtree(self.path, ignore_errors=True)

        with files.remove_on_exception(self.path):
            url = self.GIT_URL.format(**vars(self))
            repo = git.Repo.clone_from(
                url=url, to_path=self.path, b=self.branch)
            if self.commit:
                repo.head.reset(self.commit, index=True, working_tree=True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号