From 26f8c1df92c246940d1baf18b2163a90ee0681f3 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Mon, 6 Jan 2020 15:06:57 +0100 Subject: [PATCH] Don't reset dns container (#1417) * Don't reset dns container * Ignore more exception * Fix handling --- hassio/dns.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hassio/dns.py b/hassio/dns.py index 6808ca95d..b32ad834f 100644 --- a/hassio/dns.py +++ b/hassio/dns.py @@ -121,14 +121,12 @@ class CoreDNS(JsonConfig, CoreSysAttributes): # Start DNS forwarder self.sys_create_task(self.forwarder.start(self.sys_docker.network.dns)) - # Reset container configuration - if await self.instance.is_running(): - with suppress(DockerAPIError): - await self.instance.stop() - # Run CoreDNS with suppress(CoreDNSError): - await self.start() + if await self.instance.is_running(): + await self.restart() + else: + await self.start() async def unload(self) -> None: """Unload DNS forwarder."""