From 1c6acc3e8f56e75d27bee8911495ecb28487e992 Mon Sep 17 00:00:00 2001 From: Omri Iluz Date: Sun, 23 Aug 2015 02:29:39 -0700 Subject: [PATCH] No need for .keys on volumes list Since https://github.com/ansible/ansible-modules-core/commit/c3f92cca210db1f7042bfce1ff90645255f0b49e changed "volumes" to be a list instead of a dictionary, we don't need (and cannot) .keys when appending to set. Reported as bug #1957 --- lib/ansible/modules/cloud/docker/docker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/docker/docker.py b/lib/ansible/modules/cloud/docker/docker.py index 8c8ccc564f..6df8681648 100644 --- a/lib/ansible/modules/cloud/docker/docker.py +++ b/lib/ansible/modules/cloud/docker/docker.py @@ -1025,7 +1025,7 @@ class DockerManager(object): expected_volume_keys = set((image['ContainerConfig']['Volumes'] or {}).keys()) if self.volumes: - expected_volume_keys.update(self.volumes.keys()) + expected_volume_keys.update(self.volumes) actual_volume_keys = set((container['Config']['Volumes'] or {}).keys())