update env template output

When update with unexisting env template, the output contain '<'
and '>'.

murano env-template-update 849c781b2ef84a6a8961b520c11f7322 test
404 Not Found: EnvTemplate <TempId 849c781b2ef84a6a8961b520c11f7322>
is not found (HTTP 404)

Change-Id: Ifcbdc4cb5846de35e55fbeeaf21f9ce3d4748e36
This commit is contained in:
chenaidong1 2017-09-23 13:52:36 +08:00
parent aee30ad679
commit 3e71528e9c
1 changed files with 5 additions and 1 deletions

View File

@ -474,7 +474,11 @@ def do_env_template_del_app(mc, args):
help="Environment template name.")
def do_env_template_update(mc, args):
"""Update an environment template."""
env_template = mc.env_templates.update(args.id, args.name)
try:
env_template = mc.env_templates.update(args.id, args.name)
except common_exceptions.HTTPNotFound:
raise exceptions.CommandError("Environment template %s not found"
% args.id)
_print_env_template_list([env_template])