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
This commit is contained in:
Éric Lemoine 2016-02-12 10:03:06 +01:00
parent 1fbaf4dc8f
commit 085f54a4ca

View File

@ -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