When validating add-ons transform core-addons url (#2960)

This commit is contained in:
Joakim Sørensen 2021-06-15 15:06:40 +02:00 committed by GitHub
parent a4a0b43d91
commit de8a241e72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@ import asyncio
import logging
from typing import Dict, List
from ..const import URL_HASSIO_ADDONS
from ..coresys import CoreSys, CoreSysAttributes
from ..exceptions import StoreGitError, StoreJobError, StoreNotFound
from ..jobs.decorator import Job, JobCondition
@ -76,6 +77,9 @@ class StoreManager(CoreSysAttributes):
async def _add_repository(url: str, step: int):
"""Add a repository."""
job.update(progress=job.progress + step, stage=f"Checking {url} started")
if url == URL_HASSIO_ADDONS:
url = StoreType.CORE
repository = Repository(self.coresys, url)
# Load the repository