Update update_script.py

This commit is contained in:
Saifeddine ALOUI 2023-10-16 09:52:43 +02:00 committed by GitHub
parent eda447cc4d
commit 4da87946dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,8 +17,11 @@ def run_git_pull():
repo.git.submodule('update', '--init', '--recursive')
# Checkout the main branch on each submodule
for submodule in repo.submodules:
submodule_repo = submodule.module()
submodule_repo.git.checkout('main')
try:
submodule_repo = submodule.module()
submodule_repo.git.checkout('main')
except Exception as ex:
print(f"Couldn't checkout module {submodule}")
except Exception as ex:
print("Couldn't update submodules")
print(ex)