mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 06:46:24 +00:00
[Update] 修改获取资产信息产生的异常
This commit is contained in:
@@ -55,7 +55,7 @@ def set_assets_hardware_info(result, **kwargs):
|
||||
else:
|
||||
___cpu_model = 'Unknown'
|
||||
___cpu_model = ___cpu_model[:64]
|
||||
___cpu_count = info.get('ansible_processor_count', 'Unknown')
|
||||
___cpu_count = info.get('ansible_processor_count', 0)
|
||||
___cpu_cores = info.get('ansible_processor_cores', None) or len(info.get('ansible_processor', []))
|
||||
___memory = '%s %s' % capacity_convert('{} MB'.format(info.get('ansible_memtotal_mb')))
|
||||
disk_info = {}
|
||||
|
Reference in New Issue
Block a user