Fix issues with awesomeversion and representation (#2443)

This commit is contained in:
Pascal Vizeli 2021-01-17 16:39:34 +01:00 committed by GitHub
parent 8d8587ca29
commit f73e277230
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 11 additions and 11 deletions

View File

@ -2,7 +2,7 @@ aiohttp==3.7.3
async_timeout==3.0.1
atomicwrites==1.4.0
attrs==20.3.0
awesomeversion==21.1.0
awesomeversion==21.1.2
brotli==1.0.9
cchardet==2.1.7
colorlog==4.7.2

View File

@ -356,7 +356,7 @@ class DockerAddon(DockerInterface):
# Create & Run container
docker_container = self.sys_docker.run(
self.image,
tag=self.addon.version.string,
tag=str(self.addon.version),
name=self.name,
hostname=self.addon.hostname,
detach=True,

View File

@ -59,7 +59,7 @@ class DockerAudio(DockerInterface, CoreSysAttributes):
# Create & Run container
docker_container = self.sys_docker.run(
self.image,
tag=self.sys_plugins.audio.version.string,
tag=str(self.sys_plugins.audio.version),
init=False,
ipv4=self.sys_docker.network.audio,
name=self.name,

View File

@ -39,7 +39,7 @@ class DockerCli(DockerInterface, CoreSysAttributes):
self.image,
entrypoint=["/init"],
command=["/bin/bash", "-c", "sleep infinity"],
tag=self.sys_plugins.cli.version.string,
tag=str(self.sys_plugins.cli.version),
init=False,
ipv4=self.sys_docker.network.cli,
name=self.name,

View File

@ -37,7 +37,7 @@ class DockerDNS(DockerInterface, CoreSysAttributes):
# Create & Run container
docker_container = self.sys_docker.run(
self.image,
tag=self.sys_plugins.dns.version.string,
tag=str(self.sys_plugins.dns.version),
init=False,
dns=False,
ipv4=self.sys_docker.network.dns,

View File

@ -109,7 +109,7 @@ class DockerHomeAssistant(DockerInterface):
# Create & Run container
docker_container = self.sys_docker.run(
self.image,
tag=self.sys_homeassistant.version.string,
tag=(self.sys_homeassistant.version),
name=self.name,
hostname=self.name,
detach=True,

View File

@ -37,7 +37,7 @@ class DockerMulticast(DockerInterface, CoreSysAttributes):
# Create & Run container
docker_container = self.sys_docker.run(
self.image,
tag=self.sys_plugins.multicast.version.string,
tag=str(self.sys_plugins.multicast.version),
init=False,
name=self.name,
hostname=self.name.replace("_", "-"),

View File

@ -38,7 +38,7 @@ class DockerObserver(DockerInterface, CoreSysAttributes):
# Create & Run container
docker_container = self.sys_docker.run(
self.image,
tag=self.sys_plugins.observer.version.string,
tag=str(self.sys_plugins.observer.version),
init=False,
ipv4=self.sys_docker.network.observer,
name=self.name,

View File

@ -74,7 +74,7 @@ class DockerSupervisor(DockerInterface, CoreSysAttributes):
try:
docker_container = self.sys_docker.containers.get(self.name)
docker_container.image.tag(self.image, tag=self.version.string)
docker_container.image.tag(self.image, tag=str(self.version))
docker_container.image.tag(self.image, tag="latest")
except (docker.errors.DockerException, requests.RequestException) as err:
_LOGGER.error("Can't retag Supervisor version: %s", err)

View File

@ -67,10 +67,10 @@ class HassOS(CoreSysAttributes):
if raw_url is None:
_LOGGER.error("Don't have an URL for OTA updates!")
raise HassOSNotSupportedError()
url = raw_url.format(version=version.string, board=self.board)
url = raw_url.format(version=str(version), board=self.board)
_LOGGER.info("Fetch OTA update from %s", url)
raucb = Path(self.sys_config.path_tmp, f"hassos-{version.string}.raucb")
raucb = Path(self.sys_config.path_tmp, f"hassos-{version!s}.raucb")
try:
timeout = aiohttp.ClientTimeout(total=60 * 60, connect=180)
async with self.sys_websession.get(url, timeout=timeout) as request: