mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-16 02:25:10 +00:00
#743 - Trying to fix this.
This commit is contained in:
@@ -7,10 +7,10 @@ from .helpers.misc import version_left_higher_then_right
|
||||
|
||||
from custom_components.hacs.globals import get_hacs
|
||||
|
||||
MINIMUM_HA_VERSION = "0.98.0"
|
||||
MINIMUM_HA_VERSION = "0.110.0"
|
||||
|
||||
|
||||
def check_constans():
|
||||
def check_constrains():
|
||||
"""Check HACS constrains."""
|
||||
if not constrain_translations():
|
||||
return False
|
||||
@@ -54,46 +54,3 @@ def constrain_translations():
|
||||
hacs.logger.critical("You are missing the translations directory.")
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def check_requirements():
|
||||
"""Check the requirements"""
|
||||
missing = []
|
||||
try:
|
||||
from aiogithubapi import AIOGitHubException # pylint: disable=unused-import
|
||||
except ImportError:
|
||||
missing.append("aiogithubapi")
|
||||
|
||||
try:
|
||||
from hacs_frontend import locate_gz # pylint: disable=unused-import
|
||||
except ImportError:
|
||||
missing.append("hacs_frontend")
|
||||
|
||||
try:
|
||||
import semantic_version # pylint: disable=unused-import
|
||||
except ImportError:
|
||||
missing.append("semantic_version")
|
||||
|
||||
try:
|
||||
from integrationhelper import Logger # pylint: disable=unused-import
|
||||
except ImportError:
|
||||
missing.append("integrationhelper")
|
||||
|
||||
try:
|
||||
import backoff # pylint: disable=unused-import
|
||||
except ImportError:
|
||||
missing.append("backoff")
|
||||
|
||||
try:
|
||||
import aiofiles # pylint: disable=unused-import
|
||||
except ImportError:
|
||||
missing.append("aiofiles")
|
||||
|
||||
if missing:
|
||||
hacs = get_hacs()
|
||||
for requirement in missing:
|
||||
hacs.logger.critical(
|
||||
f"Required python requirement '{requirement}' is not installed"
|
||||
)
|
||||
return False
|
||||
return True
|
||||
|
Reference in New Issue
Block a user