1
0
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:
Julien Duponchelle 2016-10-14 19:00:25 +02:00
parent a9c7c3ca3b
commit fbdcf67d29
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -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"