Fix TypeError: string indices must be integers, not str in ec2.py create_attach_volumes()

This commit is contained in:
Shad Nygren 2014-12-31 23:14:04 +00:00 committed by rallytime
parent 99cacf7fd3
commit e02bd8fa0d

View File

@ -2337,9 +2337,8 @@ def create_attach_volumes(name, kwargs, call=None, wait_to_finish=True):
if 'volume_id' not in volume_dict:
created_volume = create_volume(volume_dict, call='function', wait_to_finish=wait_to_finish)
created = True
for item in created_volume:
if 'volumeId' in item:
volume_dict['volume_id'] = item['volumeId']
if 'volumeId' in created_volume:
volume_dict['volume_id'] = created_volume['volumeId']
attach = attach_volume(
name,