mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 15:16:33 +00:00
Fix lint p3
This commit is contained in:
parent
e0dcce5895
commit
c916314704
@ -29,7 +29,7 @@ class AddonManager(AddonsData):
|
||||
self.arch = arch
|
||||
|
||||
# init hassio repository
|
||||
self.repository.append(AddonsRepoHassIO(self.config, self.loop))
|
||||
self.repositories.append(AddonsRepoHassIO(self.config, self.loop))
|
||||
|
||||
# init custom repositories
|
||||
for url, slug in self.config.addons_repositories.items():
|
||||
|
@ -91,7 +91,7 @@ class AddonsRepoCustom(AddonsRepo):
|
||||
if slug is None:
|
||||
_LOGGER("Init new custom addon repository %s", url)
|
||||
with tempfile.TemporaryDirectory(dir=config.path_addons_custom) \
|
||||
temp_dir:
|
||||
as temp_dir:
|
||||
slug = temp_dir.name
|
||||
|
||||
config.add_addons_repository(url, slug)
|
||||
|
@ -31,11 +31,11 @@ UPSTREAM_BETA = 'upstream_beta'
|
||||
API_ENDPOINT = 'api_endpoint'
|
||||
|
||||
|
||||
# pylint: disable=no-value-for-parameter
|
||||
SCHEMA_CONFIG = vol.Schema({
|
||||
vol.Optional(
|
||||
HOMEASSISTANT_IMAGE,
|
||||
default=os.environ.get('HOMEASSISTANT_REPOSITORY')):
|
||||
vol.Coerce(str),
|
||||
vol.Optional(HOMEASSISTANT_IMAGE,
|
||||
default=os.environ.get('HOMEASSISTANT_REPOSITORY')):
|
||||
vol.Coerce(str),
|
||||
vol.Optional(UPSTREAM_BETA, default=False): vol.Boolean(),
|
||||
vol.Optional(API_ENDPOINT): vol.Coerce(str),
|
||||
vol.Optional(HOMEASSISTANT_LAST): vol.Coerce(str),
|
||||
@ -213,7 +213,7 @@ class CoreConfig(Config):
|
||||
|
||||
def add_addons_repository(self, repo, slug):
|
||||
"""Add a custom repository to list."""
|
||||
self._data[ADDONS_CUSTOM_LIST][repo][slug]
|
||||
self._data[ADDONS_CUSTOM_LIST][repo] = slug
|
||||
self.save()
|
||||
|
||||
def drop_addons_repository(self, repo):
|
||||
|
Loading…
x
Reference in New Issue
Block a user