1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 12:29:08 +00:00

Move addon repo migration to bootstrap (#3672)

* Move addon repo migration to bootstrap

* Save data after migrating it
This commit is contained in:
Mike Degatano
2022-06-08 15:21:34 -04:00
committed by GitHub
parent 977fd8abe2
commit 7a74d77d43
5 changed files with 29 additions and 23 deletions

View File

@@ -16,7 +16,7 @@ from supervisor import config as su_config
from supervisor.addons.addon import Addon
from supervisor.api import RestAPI
from supervisor.bootstrap import initialize_coresys
from supervisor.const import ATTR_REPOSITORIES, REQUEST_FROM
from supervisor.const import ATTR_ADDONS_CUSTOM_LIST, ATTR_REPOSITORIES, REQUEST_FROM
from supervisor.coresys import CoreSys
from supervisor.dbus.agent import OSAgent
from supervisor.dbus.const import DBUS_SIGNAL_NM_CONNECTION_ACTIVE_CHANGED
@@ -322,7 +322,7 @@ async def repository(coresys: CoreSys):
coresys.store._data[ATTR_REPOSITORIES].remove(
"https://github.com/esphome/home-assistant-addon"
)
coresys.config.clear_addons_repositories()
coresys.config._data[ATTR_ADDONS_CUSTOM_LIST] = []
with patch(
"supervisor.store.validate.BUILTIN_REPOSITORIES", {"local", "core"}