mirror of
https://github.com/home-assistant/supervisor
synced 2024-10-04 11:57:51 +02:00
Fix issues with awesomeversion and representation (#2443)
This commit is contained in:
parent
8d8587ca29
commit
f73e277230
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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("_", "-"),
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user