From 6d4e9c7d30e5b9c687245200e0f01c86f9f05947 Mon Sep 17 00:00:00 2001 From: ibuler Date: Fri, 26 Jan 2018 17:17:37 +0800 Subject: [PATCH] =?UTF-8?q?[Bugfix]=20=E8=B5=84=E4=BA=A7model=20=E5=A4=AA?= =?UTF-8?q?=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/tasks.py | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/assets/tasks.py b/apps/assets/tasks.py index 4ba59298e..1e17656e1 100644 --- a/apps/assets/tasks.py +++ b/apps/assets/tasks.py @@ -55,6 +55,7 @@ def set_assets_hardware_info(result, **kwargs): break else: ___cpu_model = 'Unknown' + ___cpu_model = ___cpu_model[:64] ___cpu_count = info['ansible_processor_count'] ___cpu_cores = info.get('ansible_processor_cores', None) or len(info.get('ansible_processor', [])) ___memory = '%s %s' % capacity_convert('{} MB'.format(info['ansible_memtotal_mb']))