From 085f54a4ca057d466786cfee193c1a38aa2b172c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Fri, 12 Feb 2016 10:03:06 +0100 Subject: [PATCH] Fix kolla_docker check_volume This commit fixes a bug in kolla_checker.py where the check_volume function will raise "TypeError NoneType object is not iterable" if there are no existing volumes. TrivialFix Change-Id: Ic57c339793fa532ed8db075ba1074db75106e36d --- ansible/library/kolla_docker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/library/kolla_docker.py b/ansible/library/kolla_docker.py index 705fc939b7..f095c4db8e 100644 --- a/ansible/library/kolla_docker.py +++ b/ansible/library/kolla_docker.py @@ -220,7 +220,7 @@ class DockerWorker(object): return image def check_volume(self): - for vol in self.dc.volumes()['Volumes']: + for vol in self.dc.volumes()['Volumes'] or list(): if vol['Name'] == self.params.get('name'): return vol