mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 11:18:11 +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
|
||||
:rtype: str
|
||||
"""
|
||||
result = yield from self.manager.query("GET", "containers/{}/json".format(self._cid))
|
||||
try:
|
||||
result = yield from self.manager.query("GET", "containers/{}/json".format(self._cid))
|
||||
except DockerError:
|
||||
return "exited"
|
||||
|
||||
if result["State"]["Paused"]:
|
||||
return "paused"
|
||||
|
Loading…
Reference in New Issue
Block a user