periodic push
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -157,14 +157,19 @@ async def hacs_repositories_add(
|
||||
if renamed := hacs.common.renamed_repositories.get(repository):
|
||||
repository = renamed
|
||||
|
||||
if not hacs.repositories.get_by_full_name(repository):
|
||||
if category not in hacs.common.categories:
|
||||
hacs.log.error("%s is not a valid category for %s", category, repository)
|
||||
|
||||
elif not hacs.repositories.get_by_full_name(repository):
|
||||
try:
|
||||
await hacs.async_register_repository(
|
||||
repository_full_name=repository,
|
||||
category=category,
|
||||
)
|
||||
|
||||
except BaseException as exception: # lgtm [py/catch-base-exception] pylint: disable=broad-except
|
||||
except (
|
||||
BaseException # lgtm [py/catch-base-exception] pylint: disable=broad-except
|
||||
) as exception:
|
||||
hacs.async_dispatch(
|
||||
HacsDispatchEvent.ERROR,
|
||||
{
|
||||
@@ -175,7 +180,6 @@ async def hacs_repositories_add(
|
||||
)
|
||||
|
||||
else:
|
||||
|
||||
hacs.async_dispatch(
|
||||
HacsDispatchEvent.ERROR,
|
||||
{
|
||||
|
||||
@@ -103,7 +103,7 @@ async def hacs_repository_ignore(
|
||||
"""Ignore a repository."""
|
||||
hacs: HacsBase = hass.data.get(DOMAIN)
|
||||
repository = hacs.repositories.get_by_id(msg["repository"])
|
||||
hacs.common.ignored_repositories.append(repository.data.full_name)
|
||||
hacs.common.ignored_repositories.add(repository.data.full_name)
|
||||
|
||||
await hacs.data.async_write()
|
||||
connection.send_message(websocket_api.result_message(msg["id"]))
|
||||
|
||||
Reference in New Issue
Block a user