Skip to content

Commit

Permalink
Catch an error when docker is not running
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-duponchelle committed Oct 14, 2016
1 parent fbdcf67 commit ec3660c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gns3server/compute/docker/docker_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,10 @@ def reset(self):
pass
# v – 1/True/true or 0/False/false, Remove the volumes associated to the container. Default false.
# force - 1/True/true or 0/False/false, Kill then remove the container. Default false.
yield from self.manager.query("DELETE", "containers/{}".format(self._cid), params={"force": 1, "v": 1})
try:
yield from self.manager.query("DELETE", "containers/{}".format(self._cid), params={"force": 1, "v": 1})
except DockerError:
pass
log.info("Docker container '{name}' [{image}] removed".format(
name=self._name, image=self._image))

Expand Down

0 comments on commit ec3660c

Please sign in to comment.