updater.py 文件源码

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

项目:SuperOcto 作者: mcecchi 项目源码 文件源码
def update_updater(self, *args):
        #if self.printer_model == 'Robo R2':
        #    branch = 'r2'
        #else:
        #    branch = 'c2'
        branch = 'master'

        if os.path.exists(self.repo_local_path):
            def del_rw(action, name, exc):
                os.chmod(name, stat.S_IWRITE)
                os.remove(name)
            # start fresh every time to avoid potential corruptions or misconfigurations
            rmtree(self.repo_local_path, onerror=del_rw)
        Repo.clone_from(self.repo_remote_path, self.repo_local_path, branch=branch)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号