Skip to content

Commit fc09359

Browse files
caberoscaberos
authored andcommitted
fix the team code review comments
1 parent 2d30c20 commit fc09359

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

SoftLayer/CLI/autoscale/delete.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Delete autoscale."""
22
# :license: MIT, see LICENSE for more details.
3-
43
import click
4+
import SoftLayer
55

66
from SoftLayer.CLI import environment
77
from SoftLayer.managers.autoscale import AutoScaleManager
@@ -18,7 +18,9 @@ def cli(env, identifier):
1818
"""
1919

2020
autoscale = AutoScaleManager(env.client)
21-
result = autoscale.delete(identifier)
2221

23-
if result:
22+
try:
23+
autoscale.delete(identifier)
2424
click.secho("%s deleted successfully" % identifier, fg='green')
25+
except SoftLayer.SoftLayerAPIError as ex:
26+
click.secho("Failed to delete %s\n%s" % (identifier, ex), fg='red')

0 commit comments

Comments
 (0)