summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoffrey F <f.joffrey@gmail.com>2014-11-03 11:09:17 -0800
committerJoffrey F <f.joffrey@gmail.com>2014-11-03 11:09:17 -0800
commit7a5f6137c862510ef54289af5240e393d446b00f (patch)
tree1e2fdb62b50c9e52a8910e6a76f6dcaf4d7ad5dc
parent790ed5525a917dbc5642382cc7b0b45e3643b657 (diff)
parent7e17a9acfeb9e1c12b028998c901cb9aae34e196 (diff)
downloaddocker-py-7a5f6137c862510ef54289af5240e393d446b00f.tar.gz
Merge pull request #333 from alexliew/change_remove_image
Change remove_image to check if image is a dictionary.
-rw-r--r--docker/client.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/docker/client.py b/docker/client.py
index 556b5cf..8bd41ac 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -877,6 +877,8 @@ class Client(requests.Session):
self._raise_for_status(res)
def remove_image(self, image, force=False, noprune=False):
+ if isinstance(image, dict):
+ image = image.get('Id')
params = {'force': force, 'noprune': noprune}
res = self._delete(self._url("/images/" + image), params=params)
self._raise_for_status(res)