`heat list` was failing for non-empty stacks because the `Stack` model had no
`template` attribute.
Also fixed an issue where we didn't show the template description when the
stack status was unknown.
mem['stack_id'] = s.id
mem['stack_name'] = s.name
mem['created_at'] = str(s.created_at)
- try:
- mem['template_description'] = s.template.description
- mem['stack_status'] = ps.t['StackStatus']
- except KeyError:
- mem['template_description'] = 'No description'
- mem['stack_status'] = 'unknown'
+ mem['template_description'] = ps.t.get('Description', 'No description')
+ mem['stack_status'] = ps.t.get('StackStatus', 'unknown')
res['stacks'].append(mem)
return res