From f73e27723052d075f238f966bcd4b6146e087f23 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Sun, 17 Jan 2021 16:39:34 +0100 Subject: [PATCH] Fix issues with awesomeversion and representation (#2443) --- requirements.txt | 2 +- supervisor/docker/addon.py | 2 +- supervisor/docker/audio.py | 2 +- supervisor/docker/cli.py | 2 +- supervisor/docker/dns.py | 2 +- supervisor/docker/homeassistant.py | 2 +- supervisor/docker/multicast.py | 2 +- supervisor/docker/observer.py | 2 +- supervisor/docker/supervisor.py | 2 +- supervisor/hassos.py | 4 ++-- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/requirements.txt b/requirements.txt index 2c5bfe0db..693fe2256 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/supervisor/docker/addon.py b/supervisor/docker/addon.py index ea16ca681..f013fef64 100644 --- a/supervisor/docker/addon.py +++ b/supervisor/docker/addon.py @@ -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, diff --git a/supervisor/docker/audio.py b/supervisor/docker/audio.py index c3bdc4fb8..d963b62ce 100644 --- a/supervisor/docker/audio.py +++ b/supervisor/docker/audio.py @@ -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, diff --git a/supervisor/docker/cli.py b/supervisor/docker/cli.py index 70e80384e..47f71a8f0 100644 --- a/supervisor/docker/cli.py +++ b/supervisor/docker/cli.py @@ -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, diff --git a/supervisor/docker/dns.py b/supervisor/docker/dns.py index 76fe32cf2..17bf1db3d 100644 --- a/supervisor/docker/dns.py +++ b/supervisor/docker/dns.py @@ -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, diff --git a/supervisor/docker/homeassistant.py b/supervisor/docker/homeassistant.py index 66f941c89..17385d907 100644 --- a/supervisor/docker/homeassistant.py +++ b/supervisor/docker/homeassistant.py @@ -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, diff --git a/supervisor/docker/multicast.py b/supervisor/docker/multicast.py index 3a241f617..425b6c9d4 100644 --- a/supervisor/docker/multicast.py +++ b/supervisor/docker/multicast.py @@ -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("_", "-"), diff --git a/supervisor/docker/observer.py b/supervisor/docker/observer.py index 87a43d736..72aeda259 100644 --- a/supervisor/docker/observer.py +++ b/supervisor/docker/observer.py @@ -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, diff --git a/supervisor/docker/supervisor.py b/supervisor/docker/supervisor.py index d48584246..3316e44b3 100644 --- a/supervisor/docker/supervisor.py +++ b/supervisor/docker/supervisor.py @@ -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) diff --git a/supervisor/hassos.py b/supervisor/hassos.py index 6e0d2a74f..7c0616e4b 100644 --- a/supervisor/hassos.py +++ b/supervisor/hassos.py @@ -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: