mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-25 11:01:09 +00:00
Fix compatibility without module_type
Some vendors do not provide module_type value. For such vendors, simply omit the information rather than fail.
This commit is contained in:
parent
bf005eace6
commit
2c9c778ca7
@ -58,7 +58,9 @@ def print_mem_info(node, prefix, meminfo):
|
||||
if meminfo.get('ecc', False):
|
||||
memdescfmt += 'ECC '
|
||||
capacity = meminfo['capacity_mb'] / 1024
|
||||
memdescfmt += meminfo['module_type']
|
||||
modtype = meminfo.get('module_type', None)
|
||||
if modtype:
|
||||
memdescfmt += modtype
|
||||
memdesc = memdescfmt.format(capacity, meminfo['speed'])
|
||||
print('{0}: {1} description: {2}'.format(node, prefix, memdesc))
|
||||
print('{0}: {1} manufacturer: {2}'.format(
|
||||
|
Loading…
Reference in New Issue
Block a user