Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't assume ExposedPorts exists (bug ansible#2257)
A recent change [1] in docker between v1.8.2 and v1.8.3 changed what is returned in the json when inspecting an image. Five variables which could have been expected before will now be omited when empty. Only one of those variables is being addressed in the docker, ExposedPorts. Unfortunately there was also no API version change on this so this can't be easily corrected with pinning the API to the older version. This does a get() which will return None if the variable is not in the dict formed from the json that was returned. Everything else works the same way. [1] moby/moby@9098628
- Loading branch information