Skip to content

Commit 0cf752f

Browse files
author
Sergio Carlos Morales Angeles
committed
Avoid blindly passing memory result to formatter
1 parent 413f919 commit 0cf752f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

SoftLayer/CLI/hardware/detail.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ def cli(env, identifier, passwords, price):
4343
table.add_row(['datacenter',
4444
result['datacenter']['name'] or formatting.blank()])
4545
table.add_row(['cores', result['processorPhysicalCoreAmount']])
46-
table.add_row(['memory', formatting.gb(result['memoryCapacity'])])
46+
memory = formatting.gb(result['memoryCapacity']) if result.get('memoryCapacity') else formatting.blank()
47+
table.add_row(['memory', memory])
4748
table.add_row(['public_ip',
4849
result['primaryIpAddress'] or formatting.blank()])
4950
table.add_row(['private_ip',

0 commit comments

Comments
 (0)