From: Zane Bitter Date: Fri, 13 Apr 2012 15:58:23 +0000 (+0200) Subject: Show stack description when status is unknown X-Git-Tag: 2014.1~2024 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=0525333416283fa02c86fc17693c23d53c984f1e;p=openstack-build%2Fheat-build.git Show stack description when status is unknown Apply the same improvement that d41193cbff97caf68a5eaa5b105593af17e3339d made for list_stacks to show_stack. Signed-off-by: Zane Bitter --- diff --git a/heat/engine/manager.py b/heat/engine/manager.py index d3f81d25..bf2a84ca 100644 --- a/heat/engine/manager.py +++ b/heat/engine/manager.py @@ -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