mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-10-16 15:19:40 +00:00
Use exit code to detect wrong configs (#156)
* Update homeassistant.py * Update homeassistant.py * Update util.py * add support for yaml errors
This commit is contained in:
@@ -103,15 +103,15 @@ class DockerHomeAssistant(DockerBase):
|
||||
)
|
||||
|
||||
# wait until command is done
|
||||
container.wait()
|
||||
exit_code = container.wait()
|
||||
output = container.logs()
|
||||
|
||||
except docker.errors.DockerException as err:
|
||||
_LOGGER.error("Can't execute command -> %s", err)
|
||||
return b""
|
||||
return (None, b"")
|
||||
|
||||
# cleanup container
|
||||
with suppress(docker.errors.DockerException):
|
||||
container.remove(force=True)
|
||||
|
||||
return output
|
||||
return (exit_code, output)
|
||||
|
Reference in New Issue
Block a user