diff --git a/compose/service.py b/compose/service.py index ac0a84906b..dbcec10382 100644 --- a/compose/service.py +++ b/compose/service.py @@ -439,17 +439,6 @@ class Service(object): else: raise Exception("Invalid action: {}".format(action)) - def _recreate_stop_container(self, container, timeout): - try: - container.stop(timeout=timeout) - except APIError as e: - if (e.response.status_code == 500 - and e.explanation - and 'no such process' in str(e.explanation)): - pass - else: - raise - def recreate_container(self, container, timeout=DEFAULT_TIMEOUT, @@ -462,7 +451,7 @@ class Service(object): """ log.info("Recreating %s" % container.name) - self._recreate_stop_container(container, timeout) + container.stop(timeout=timeout) container.rename_to_tmp_name() new_container = self.create_container( do_build=False,