mirror of
https://github.com/GNS3/gns3-server
synced 2025-02-26 07:02:12 +00:00
If docker container state failed to return we consider the container stopped
This commit is contained in:
parent
a9c7c3ca3b
commit
fbdcf67d29
@ -180,7 +180,10 @@ class DockerVM(BaseNode):
|
|||||||
:returns: state
|
:returns: state
|
||||||
:rtype: str
|
:rtype: str
|
||||||
"""
|
"""
|
||||||
|
try:
|
||||||
result = yield from self.manager.query("GET", "containers/{}/json".format(self._cid))
|
result = yield from self.manager.query("GET", "containers/{}/json".format(self._cid))
|
||||||
|
except DockerError:
|
||||||
|
return "exited"
|
||||||
|
|
||||||
if result["State"]["Paused"]:
|
if result["State"]["Paused"]:
|
||||||
return "paused"
|
return "paused"
|
||||||
|
Loading…
Reference in New Issue
Block a user