mirror of https://github.com/docker/docker-py.git
Added timeout param to Client.wait
This commit is contained in:
parent
7fcddc22ce
commit
51c6b34859
|
@ -1038,11 +1038,11 @@ class Client(requests.Session):
|
|||
res = self._post(url)
|
||||
self._raise_for_status(res)
|
||||
|
||||
def wait(self, container):
|
||||
def wait(self, container, timeout=None):
|
||||
if isinstance(container, dict):
|
||||
container = container.get('Id')
|
||||
url = self._url("/containers/{0}/wait".format(container))
|
||||
res = self._post(url, timeout=None)
|
||||
res = self._post(url, timeout=timeout)
|
||||
self._raise_for_status(res)
|
||||
json_ = res.json()
|
||||
if 'StatusCode' in json_:
|
||||
|
|
Loading…
Reference in New Issue