Skip to content

Commit 1dd4cee

Browse files
author
Brian Flores
committed
fix observations
1 parent a85bda3 commit 1dd4cee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

SoftLayer/CLI/dedicatedhost/list.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ def cli(env, sortby, datacenter, name, tag, order, owner):
3333
table.align['Name'] = 'l'
3434
table.sortby = sortby
3535

36-
if len(dedicated_hosts) == 0:
37-
click.secho("No dedicated hosts are found.")
38-
else:
36+
if len(dedicated_hosts) != 0:
3937
for host in dedicated_hosts:
4038
cpu_allocated = host.get('allocationStatus').get('cpuAllocated')
4139
cpu_total = host.get('allocationStatus').get('cpuCount')
@@ -55,3 +53,5 @@ def cli(env, sortby, datacenter, name, tag, order, owner):
5553
])
5654

5755
env.fout(table)
56+
else:
57+
click.secho("No dedicated hosts are found.")

0 commit comments

Comments
 (0)