diff --git a/supervisor/store/data.py b/supervisor/store/data.py index dd1fe0dd5..47d6b1e07 100644 --- a/supervisor/store/data.py +++ b/supervisor/store/data.py @@ -18,6 +18,7 @@ from ..coresys import CoreSys, CoreSysAttributes from ..exceptions import JsonFileError from ..resolution.const import ContextType, IssueType, SuggestionType from ..utils.json import read_json_file +from .const import StoreType from .utils import extract_hash_from_path from .validate import SCHEMA_REPOSITORY_CONFIG @@ -83,11 +84,14 @@ class StoreData(CoreSysAttributes): if ".git" not in addon.parts ] except OSError as err: + suggestion = None + if path.stem != StoreType.LOCAL: + suggestion = [SuggestionType.EXECUTE_RESET] self.sys_resolution.create_issue( IssueType.CORRUPT_REPOSITORY, ContextType.STORE, reference=path.stem, - suggestions=[SuggestionType.EXECUTE_RESET], + suggestions=suggestion, ) _LOGGER.critical( "Can't process %s because of Filesystem issues: %s", repository, err diff --git a/supervisor/store/git.py b/supervisor/store/git.py index d5ae5ee08..ab67a329d 100644 --- a/supervisor/store/git.py +++ b/supervisor/store/git.py @@ -147,9 +147,10 @@ class GitRepo(CoreSysAttributes): async with self.lock: _LOGGER.info("Update add-on %s repository", self.url) - branch = self.repo.active_branch.name try: + branch = self.repo.active_branch.name + # Download data await self.sys_run_in_executor( ft.partial( @@ -182,6 +183,7 @@ class GitRepo(CoreSysAttributes): git.InvalidGitRepositoryError, git.NoSuchPathError, git.GitCommandError, + ValueError, ) as err: _LOGGER.error("Can't update %s repo: %s.", self.url, err) self.sys_resolution.create_issue(