Skip to content

Commit

Permalink
Merge pull request docker#3921 from shin-/3890-pull-services
Browse files Browse the repository at this point in the history
Fix command hint in bundle to pull services instead of images
  • Loading branch information
dnephin authored Sep 13, 2016
2 parents 3dec600 + 817c76c commit 9faa852
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions compose/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ def __init__(self, image_name):


class NeedsPull(Exception):
def __init__(self, image_name):
def __init__(self, image_name, service_name):
self.image_name = image_name
self.service_name = service_name


class MissingDigests(Exception):
Expand All @@ -74,7 +75,7 @@ def get_image_digests(project, allow_push=False):
except NeedsPush as e:
needs_push.add(e.image_name)
except NeedsPull as e:
needs_pull.add(e.image_name)
needs_pull.add(e.service_name)

if needs_push or needs_pull:
raise MissingDigests(needs_push, needs_pull)
Expand Down Expand Up @@ -109,7 +110,7 @@ def get_image_digest(service, allow_push=False):
return image['RepoDigests'][0]

if 'build' not in service.options:
raise NeedsPull(service.image_name)
raise NeedsPull(service.image_name, service.name)

if not allow_push:
raise NeedsPush(service.image_name)
Expand Down

0 comments on commit 9faa852

Please sign in to comment.