summaryrefslogtreecommitdiff
path: root/docker/api
diff options
context:
space:
mode:
Diffstat (limited to 'docker/api')
-rw-r--r--docker/api/container.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/docker/api/container.py b/docker/api/container.py
index 152a08b..962d8cb 100644
--- a/docker/api/container.py
+++ b/docker/api/container.py
@@ -1207,8 +1207,8 @@ class ContainerApiMixin(object):
or ``removed``
Returns:
- (int or dict): The exit code of the container. Returns the full API
- response if no ``StatusCode`` field is included.
+ (dict): The API's response as a Python dictionary, including
+ the container's exit code under the ``StatusCode`` attribute.
Raises:
:py:class:`requests.exceptions.ReadTimeout`
@@ -1226,8 +1226,4 @@ class ContainerApiMixin(object):
params['condition'] = condition
res = self._post(url, timeout=timeout, params=params)
- self._raise_for_status(res)
- json_ = res.json()
- if 'StatusCode' in json_:
- return json_['StatusCode']
- return json_
+ return self._result(res, True)