From 4da87946dcdbe3afe0db4ad65ce6da003b31735d Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Mon, 16 Oct 2023 09:52:43 +0200 Subject: [PATCH] Update update_script.py --- update_script.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/update_script.py b/update_script.py index b78ee44e..bcd9bc23 100644 --- a/update_script.py +++ b/update_script.py @@ -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)