Small fixes

This commit is contained in:
pvizeli 2017-04-04 11:54:01 +02:00
parent 3e7f0a82c0
commit c74228adca
3 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ class HassIO(object):
"Connected to HostControll. OS: %s Version: %s Hostname: %s " "Connected to HostControll. OS: %s Version: %s Hostname: %s "
"Feature-lvl: %d", host_info.get('os'), "Feature-lvl: %d", host_info.get('os'),
host_info.get('version'), host_info.get('hostname'), host_info.get('version'), host_info.get('hostname'),
host_info.get('level')) host_info.get('level', 0))
# rest api views # rest api views
self.api.register_host(self.host_controll) self.api.register_host(self.host_controll)

View File

@ -106,7 +106,7 @@ class DockerBase(object):
async def attach(self): async def attach(self):
"""Attach to running docker container.""" """Attach to running docker container."""
if self._lock.locked: if self._lock.locked:
_LOGGER.error("Can't excute stop while a task is in progress") _LOGGER.error("Can't excute attach while a task is in progress")
return False return False
async with self._lock: async with self._lock:

View File

@ -56,8 +56,8 @@ class DockerHomeAssistant(DockerBase):
self.version = get_version_from_env( self.version = get_version_from_env(
self.container.attrs['Config']['Env']) self.container.attrs['Config']['Env'])
except docker.errors.DockerException: except docker.errors.DockerException as err:
_LOGGER.error("Can't run %s", self.image) _LOGGER.error("Can't run %s -> %s.", self.image, err)
return False return False
return True return True