mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 15:16:33 +00:00
Better fix for OS error on repository reading (#2021)
This commit is contained in:
parent
c707934018
commit
6fbec53f8a
@ -75,7 +75,12 @@ class StoreData(CoreSysAttributes):
|
||||
def _read_addons_folder(self, path, repository):
|
||||
"""Read data from add-ons folder."""
|
||||
try:
|
||||
addon_list = path.glob("**/config.json")
|
||||
# Generate a list without artefact, safe for corruptions
|
||||
addon_list = [
|
||||
addon
|
||||
for addon in path.glob("**/config.json")
|
||||
if ".git" not in addon.parts
|
||||
]
|
||||
except OSError as err:
|
||||
self.sys_core.healthy = False
|
||||
_LOGGER.critical(
|
||||
@ -85,10 +90,6 @@ class StoreData(CoreSysAttributes):
|
||||
return
|
||||
|
||||
for addon in addon_list:
|
||||
# Ingore git artefacts
|
||||
if ".git" in addon.parts:
|
||||
continue
|
||||
|
||||
try:
|
||||
addon_config = read_json_file(addon)
|
||||
except JsonFileError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user