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:
parent
1fbaf4dc8f
commit
085f54a4ca
@ -220,7 +220,7 @@ class DockerWorker(object):
|
|||||||
return image
|
return image
|
||||||
|
|
||||||
def check_volume(self):
|
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'):
|
if vol['Name'] == self.params.get('name'):
|
||||||
return vol
|
return vol
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user