Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add errors to ProjectError message, duplicate code #8063

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update project.py
Signed-off-by: tobiasb <[email protected]>
Signed-off-by: sezanzeb <[email protected]>
  • Loading branch information
sezanzeb committed Jan 22, 2021
commit 0abc7923c254d0226340c3b49973d3aab9be6427
9 changes: 4 additions & 5 deletions compose/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ def build_service(service):
'Building',
limit=5,
)

raise_errors(errors)

else:
Expand Down Expand Up @@ -714,6 +715,7 @@ def get_deps(service):
None,
get_deps,
)

raise_errors(errors)

return [
Expand Down Expand Up @@ -821,11 +823,8 @@ def pull_service(service):
log.warning('Some service image(s) must be built from source by running:\n'
' docker-compose build {}'
.format(' '.join(must_build)))
if len(errors):
combined_errors = '\n'.join([
e.decode('utf-8') if isinstance(e, bytes) else e for e in errors.values()
])
raise ProjectError(combined_errors)

raise_errors(errors)

def push(self, service_names=None, ignore_push_failures=False):
unique_images = set()
Expand Down