Skip to content

Commit a7cb4dd

Browse files
authored
Merge pull request #849 from sergiocarlosmorales/fix-memory-hardware-list
Avoid blindly passing memory result to formatter
2 parents f9c0d49 + 8a7dddf commit a7cb4dd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

SoftLayer/CLI/hardware/detail.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ 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'])
47+
if result.get('memoryCapacity')
48+
else formatting.blank())
49+
table.add_row(['memory', memory])
4750
table.add_row(['public_ip',
4851
result['primaryIpAddress'] or formatting.blank()])
4952
table.add_row(['private_ip',

0 commit comments

Comments
 (0)