fix pull bug

This commit is contained in:
Pascal Vizeli 2017-03-29 21:46:49 +02:00
parent 73adbd9645
commit dc02c14a36

View File

@ -40,12 +40,12 @@ class DockerBase(object):
""" """
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("{}:{}".format(self.image, tag))
if tag != 'latest': if tag != 'latest':
image.tag(self.image, tag='latest') image.tag(self.image, tag='latest')
except docker.errors.APIError as err: except docker.errors.APIError as err:
_LOGGER.error("Can't pull %s:%s -> %s.", self.image, tag, err) _LOGGER.error("Can't install %s:%s -> %s.", self.image, tag, err)
return False return False
return True return True