If docker container state failed to return we consider the container stopped

pull/729/head
Julien Duponchelle 8 years ago
parent a9c7c3ca3b
commit fbdcf67d29
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

@ -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…
Cancel
Save