Fix error when there are no docker volumes present yet (#28145)
* Fix error when there are no docker volumes present yet * fixes suggested by Shippable
This commit is contained in:
parent
c3564096cd
commit
11faafcbf7
1 changed files with 3 additions and 0 deletions
|
@ -149,6 +149,9 @@ class DockerVolumeManager(object):
|
|||
except APIError as e:
|
||||
self.client.fail(text_type(e))
|
||||
|
||||
if volumes[u'Volumes'] is None:
|
||||
return None
|
||||
|
||||
for volume in volumes[u'Volumes']:
|
||||
if volume['Name'] == self.parameters.volume_name:
|
||||
return volume
|
||||
|
|
Loading…
Reference in a new issue