update formatted lines to use named identifiers

This commit is contained in:
tedder 2016-11-18 14:46:10 -08:00 committed by Matt Clay
parent c22e383836
commit 78f8ef267c

View file

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