summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoffrey F <f.joffrey@gmail.com>2014-01-31 09:40:23 -0800
committerJoffrey F <f.joffrey@gmail.com>2014-01-31 09:40:23 -0800
commit548b1e7f6cc60e8ece03f972ce21e83ad3a71906 (patch)
tree9446edebe9e649670432cf38aab05cf218c6b9d2
parent789c22b9337766702e5a6fa6eb4225dc8556f008 (diff)
parent334ac126615fb8fc82d3e1f9191e0cd068345832 (diff)
downloaddocker-py-548b1e7f6cc60e8ece03f972ce21e83ad3a71906.tar.gz
Merge pull request #156 from dmiyakawa/master
Allow copy() to accept dictionary like diff()
-rw-r--r--docker/client.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/docker/client.py b/docker/client.py
index c81aa9e..9f2c952 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -403,6 +403,8 @@ class Client(requests.Session):
return res
def copy(self, container, resource):
+ if isinstance(container, dict):
+ container = container.get('Id')
res = self._post_json(
self._url("/containers/{0}/copy".format(container)),
data={"Resource": resource},