diff --git a/update/utils/git_util.py b/update/utils/git_util.py index 25002bc..7f45d3f 100644 --- a/update/utils/git_util.py +++ b/update/utils/git_util.py @@ -152,8 +152,8 @@ class GitDbUtil: # 从git中获取版本列表后和数据库对比,添加新的版本到数据库 def set_release_to_db(self): local_repo = Repo(self.local_code_path) - local_repo.git.execute('git remote update origin --prune') # 更新远程列表 - local_repo.git.execute('git fetch --all') + local_repo.git.execute(command='git remote update origin --prune', shell=True) # 更新远程列表 + local_repo.git.execute(command='git fetch --all', shell=True) release = [] for remote in local_repo.remotes: for ref in remote.refs: