diff options
author | Joffrey F <joffrey@docker.com> | 2015-04-22 17:57:10 -0700 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2015-04-22 18:00:53 -0700 |
commit | 6228929a88575c9c0e250bc1969e9611e542abc4 (patch) | |
tree | b75b732f5acdc3cb74cf65ecece848df9a0f4190 /docker/client.py | |
parent | c328be7deb59077b73d2263cfdf6eaaecc01ad64 (diff) | |
download | docker-py-client_side_trunc.tar.gz |
Handle ID truncate on client side in containers list (and changed default from True to False)client_side_trunc
Diffstat (limited to 'docker/client.py')
-rw-r--r-- | docker/client.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/docker/client.py b/docker/client.py index a94849d..00ba0de 100644 --- a/docker/client.py +++ b/docker/client.py @@ -411,7 +411,7 @@ class Client(requests.Session): return self._result(self._post_json(u, data=conf, params=params), json=True) - def containers(self, quiet=False, all=False, trunc=True, latest=False, + def containers(self, quiet=False, all=False, trunc=False, latest=False, since=None, before=None, limit=-1, size=False, filters=None): params = { @@ -429,6 +429,9 @@ class Client(requests.Session): if quiet: return [{'Id': x['Id']} for x in res] + if trunc: + for x in res: + x['Id'] = x['Id'][:12] return res def copy(self, container, resource): |