Skip to content

Commit 64bffc3

Browse files
committed
Fix issue where the summary command fails due to None being provided as the datacenter name.
1 parent 504f4db commit 64bffc3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

SoftLayer/CLI/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def cli(env,
115115
**kwargs):
116116
"""Main click CLI entry-point."""
117117

118-
# Populate environement with client and set it as the context object
118+
# Populate environment with client and set it as the context object
119119
env.skip_confirmations = really
120120
env.config_file = config
121121
env.format = format

SoftLayer/CLI/summary.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ def cli(env, sortby):
3333

3434
for name, datacenter in datacenters.items():
3535
table.add_row([
36-
name,
37-
datacenter['hardware_count'],
38-
datacenter['virtual_guest_count'],
39-
datacenter['vlan_count'],
40-
datacenter['subnet_count'],
41-
datacenter['public_ip_count'],
36+
name or formatting.blank(),
37+
datacenter.get('hardware_count', formatting.blank()),
38+
datacenter.get('virtual_guest_count', formatting.blank()),
39+
datacenter.get('vlan_count', formatting.blank()),
40+
datacenter.get('subnet_count', formatting.blank()),
41+
datacenter.get('public_ip_count', formatting.blank()),
4242
])
4343

4444
env.fout(table)

0 commit comments

Comments
 (0)