(hacs)
return True
Load HACS repositroy.
Load HACS repositroy.
Load HACS repositroy .
async def load_hacs_repository(hacs):
    """Load HACS repositroy."""
    try:
        await hacs().register_repository("custom-components/hacs", "integration")
        repository = hacs().get_by_name("custom-components/hacs")
        if repository is None:
            raise AIOGitHubException("Unknown error")
        repository.status.installed = True
        repository.versions.installed = const.VERSION
        repository.status.new = False
        hacs.repo = repository.repository_object
    except (
        AIOGitHubException,
        AIOGitHubRatelimit,
        AIOGitHubAuthentication,
    ) as exception:
        hacs.logger.critical(f"[{exception}] - Could not load HACS!")
        return False
    return True
async def load_hacs_repository ( hacs ) : try : await hacs ( ) . register_repository ( "custom-components/hacs" , "integration" ) repository = hacs ( ) . get_by_name ( "custom-components/hacs" ) if repository is None : raise AIOGitHubException ( "Unknown error" ) repository . status . installed = True repository . versions . installed = const . VERSION repository . status . new = False hacs . repo = repository . repository_object except ( AIOGitHubException , AIOGitHubRatelimit , AIOGitHubAuthentication , ) as exception : hacs . logger . critical ( f"[{exception}] - Could not load HACS!" ) return False return True