add .format indexes for 2.6 compatability

Fixes #5551; the "".format() style needs to have `{0}` instead of the implied `{}` version for compatability with 2.6.
This commit is contained in:
tedder 2016-11-10 08:17:17 -08:00 committed by Matt Clay
parent 74b32d9ec0
commit c77f7af765

View file

@ -270,11 +270,11 @@ def get_stack_events(cfn, stack_name):
return ret return ret
for e in events.get('StackEvents', []): for e in events.get('StackEvents', []):
eventline = 'StackEvent {} {} {}'.format(e['ResourceType'], e['LogicalResourceId'], e['ResourceStatus']) eventline = 'StackEvent {0} {1} {2}'.format(e['ResourceType'], e['LogicalResourceId'], e['ResourceStatus'])
ret['events'].append(eventline) ret['events'].append(eventline)
if e['ResourceStatus'].endswith('FAILED'): if e['ResourceStatus'].endswith('FAILED'):
failline = '{} {} {}: {}'.format(e['ResourceType'], e['LogicalResourceId'], e['ResourceStatus'], e['ResourceStatusReason']) failline = '{0} {1} {2}: {3}'.format(e['ResourceType'], e['LogicalResourceId'], e['ResourceStatus'], e['ResourceStatusReason'])
ret['log'].append(failline) ret['log'].append(failline)
return ret return ret