From 779997c2b8aa1df2b484440ef1d3a6b09058fcff Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Sat, 22 Oct 2022 19:03:48 -0400 Subject: [PATCH] git_deploy: refresh previously corrupt repos It is possible that the user manually corrected a corrupt repo. If a repo makes it past initialization reset the corrupt flag. Signed-off-by: Eric Callahan --- moonraker/components/update_manager/git_deploy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moonraker/components/update_manager/git_deploy.py b/moonraker/components/update_manager/git_deploy.py index db7ed8d..3378f4e 100644 --- a/moonraker/components/update_manager/git_deploy.py +++ b/moonraker/components/update_manager/git_deploy.py @@ -401,6 +401,8 @@ class GitRepo: raise else: self.initialized = True + # If no exception was raised assume the repo is not corrupt + self.repo_corrupt = False finally: self.init_evt.set() self.init_evt = None @@ -571,8 +573,6 @@ class GitRepo: async def update_repo_status(self) -> bool: async with self.git_operation_lock: self.valid_git_repo = False - if self.repo_corrupt: - return False if not self.git_path.joinpath(".git").exists(): logging.info( f"Git Repo {self.alias}: path '{self.git_path}'"