Skip to content

Commit

Permalink
Warn instead of break on unknown category (#3108)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Apr 6, 2023
1 parent b35439d commit 356a4db
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion custom_components/hacs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,12 @@ async def async_register_repository(
raise AddonRepositoryException()

if category not in RERPOSITORY_CLASSES:
raise HacsException(f"{category} is not a valid repository category.")
self.log.warning(
"%s is not a valid repository category, %s will not be registered.",
category,
repository_full_name,
)
return

if (renamed := self.common.renamed_repositories.get(repository_full_name)) is not None:
repository_full_name = renamed
Expand Down

0 comments on commit 356a4db

Please sign in to comment.