Show stack description when status is unknown

Apply the same improvement that d41193cbff
made for list_stacks to show_stack.

Signed-off-by: Zane Bitter <zbitter@redhat.com>
This commit is contained in:
Zane Bitter 2012-04-13 17:58:23 +02:00
parent 5c69b6087a
commit 0525333416
1 changed files with 2 additions and 6 deletions

View File

@ -69,12 +69,8 @@ class EngineManager(manager.Manager):
mem['Parameters'] = ps.t['Parameters']
mem['StackStatusReason'] = 'TODO'
mem['TimeoutInMinutes'] = 'TODO'
try:
mem['TemplateDescription'] = ps.t['Description']
mem['StackStatus'] = ps.t['StackStatus']
except KeyError:
mem['TemplateDescription'] = 'No description'
mem['StackStatus'] = 'unknown'
mem['TemplateDescription'] = ps.t.get('Description', 'No description')
mem['StackStatus'] = ps.t.get('StackStatus', 'unknown')
res['stacks'].append(mem)
return res