mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
fix ident, raise TaskError
This commit is contained in:
parent
99786539c7
commit
141e6399f3
1 changed files with 26 additions and 25 deletions
|
@ -76,6 +76,7 @@ class PullDockerImages(Task):
|
|||
|
||||
@classmethod
|
||||
def run(cls, info):
|
||||
from bootstrapvz.common.exceptions import TaskError
|
||||
images = info.manifest.plugins['docker_daemon'].get('pull_images', [])
|
||||
retries = info.manifest.plugins['docker_daemon'].get('pull_images_retries', 10)
|
||||
|
||||
|
@ -95,11 +96,11 @@ class PullDockerImages(Task):
|
|||
cmd = [bin_docker, '-H', socket, 'load', '-i', img]
|
||||
if log_check_call(cmd) != 0:
|
||||
msg = 'error loading docker image {img}.'.format(img=img)
|
||||
raise Exception(msg)
|
||||
raise TaskError(msg)
|
||||
else: # regular docker image
|
||||
cmd = [bin_docker, '-H', socket, 'pull', img]
|
||||
if log_check_call(cmd) != 0:
|
||||
msg = 'error pulling docker image {img}.'.format(img=img)
|
||||
raise Exception(msg)
|
||||
raise TaskError(msg)
|
||||
finally:
|
||||
daemon.terminate()
|
||||
|
|
Loading…
Add table
Reference in a new issue