Fix return code on firewall-rules-install failure

Returns a proper return code if firewall-rules-install command fails.

Story: 2002852
Task: 22801

Change-Id: I3075748f084f0a11bc7408019bec98078b329b00
Signed-off-by: Jack Ding <jack.ding@windriver.com>
This commit is contained in:
Teresa Ho 2018-06-08 15:38:17 -04:00 committed by Jack Ding
parent 420d523e44
commit 7c21fd9235
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ def do_firewall_rules_install(cc, args):
response = cc.firewallrules.import_firewall_rules(fw_file)
error = response.get('error')
if error:
print "Firewall rules install failed: %s" % error
raise exc.CommandError("%s" % error)
else:
_print_firewallrules_show(response.get('firewallrules'))
except exc.HTTPNotFound: