Skip to content

Commit

Permalink
Fix docker#5465 by catching a no-image exception in
Browse files Browse the repository at this point in the history
get_container_data_volumes. The ImageNotFound exception is now bubbled
up to the client, which prompts the user on the desired course of action
(rebuild or abort). Added a case to the unit test to check that
an empty existing image doesn't result in an exception.

Closed old pull request docker#5466 because I did a rebase and it showed over
300 commits to merge, which I thought was messy.

Signed-off-by: Ian Glen Neal <[email protected]>
  • Loading branch information
iangneal committed Jan 11, 2018
1 parent 3cc3078 commit 23239f7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 0 additions & 4 deletions compose/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,11 +793,7 @@ def _get_container_create_options(
override_options.get('labels'))

container_options, override_options = self._build_container_volume_options(
<<<<<<< 31ed61f8884fe526d21cce79f75c6a8d7ed2dcc5
previous_container, container_options, override_options
=======
previous_container, container_options, override_options, rebuild
>>>>>>> Fix #5465 by catching a no-image exception in
)

container_options['image'] = self.image_name
Expand Down
1 change: 1 addition & 0 deletions tests/unit/config/interpolation_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# encoding: utf-8


from __future__ import absolute_import
from __future__ import unicode_literals

Expand Down

0 comments on commit 23239f7

Please sign in to comment.