mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-26 02:26:30 +00:00
add error to log
This commit is contained in:
parent
3abb11dab6
commit
73adbd9645
@ -39,13 +39,13 @@ class DockerBase(object):
|
|||||||
Need run inside executor.
|
Need run inside executor.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
_LOGGER.info("Pull image %s tag %s", self.image, tag)
|
_LOGGER.info("Pull image %s tag %s.", self.image, tag)
|
||||||
image = self.dock.images.pull(self.image, tag=tag)
|
image = self.dock.images.pull(self.image, tag=tag)
|
||||||
|
|
||||||
if tag != 'latest':
|
if tag != 'latest':
|
||||||
image.tag(self.image, tag='latest')
|
image.tag(self.image, tag='latest')
|
||||||
except docker.errors.APIError:
|
except docker.errors.APIError as err:
|
||||||
_LOGGER.error("Can't pull %s:%s", self.image, tag)
|
_LOGGER.error("Can't pull %s:%s -> %s.", self.image, tag, err)
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user