ansible/cloud/docker
Adam Williamson 64b8596250 fix #2043: strip empty dict from end of 'pull' stream
When pulling an image using Docker 1.8, it seems the output
JSON stream has an empty dict at the very end. This causes
ansible to fail when pulling an image, as it's expecting a
status message in that dict which it uses to determine whether
it had to download the image or not. As a bit of an ugly hack
for that which remains backward compatible, try the last item
in the stream, and if it's an empty dict, take the last-but-one
item instead.

The strip() is needed as the exact value appears to be '{}/r/n';
we could just match that, but it seems like the kind of thing
where maybe it'd happen to just be '{}/n' or '{}' or something
in some cases, so let's just use strip() in case.
2015-10-13 22:33:46 -07:00
..
__init__.py added __init__.py to new cloud subcategories so builds work again 2014-11-05 11:07:19 -05:00
docker.py fix #2043: strip empty dict from end of 'pull' stream 2015-10-13 22:33:46 -07:00
docker_image.py Set a default value for DEFAULT_DOCKER_API_VERSION so we can create the AnsibleModule without docker-py 2015-08-03 08:44:48 -07:00