mirror of
https://github.com/GNS3/gns3-server
synced 2025-02-03 11:51:31 +00:00
Catch an error when docker is not running
This commit is contained in:
parent
fbdcf67d29
commit
ec3660c979
@ -603,7 +603,10 @@ class DockerVM(BaseNode):
|
|||||||
pass
|
pass
|
||||||
# v – 1/True/true or 0/False/false, Remove the volumes associated to the container. Default false.
|
# 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.
|
# force - 1/True/true or 0/False/false, Kill then remove the container. Default false.
|
||||||
|
try:
|
||||||
yield from self.manager.query("DELETE", "containers/{}".format(self._cid), params={"force": 1, "v": 1})
|
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(
|
log.info("Docker container '{name}' [{image}] removed".format(
|
||||||
name=self._name, image=self._image))
|
name=self._name, image=self._image))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user