From b2f499fed43a1091de9e8e00db8c3e60bb5603cb Mon Sep 17 00:00:00 2001 From: nicolargo Date: Mon, 20 Jul 2020 10:45:38 +0200 Subject: Quick Look missing CPU Infos #1685 --- glances/plugins/glances_quicklook.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/glances/plugins/glances_quicklook.py b/glances/plugins/glances_quicklook.py index 456ecb12..e49628e4 100644 --- a/glances/plugins/glances_quicklook.py +++ b/glances/plugins/glances_quicklook.py @@ -2,7 +2,7 @@ # # This file is part of Glances. # -# Copyright (C) 2019 Nicolargo +# Copyright (C) 2020 Nicolargo # # Glances is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by @@ -14,8 +14,8 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . +# You should have received a copy of the GNU Lesser General Public License """Quicklook plugin.""" @@ -92,7 +92,11 @@ class Plugin(GlancesPlugin): cpu_info = cpuinfo.get_cpu_info() # Check cpu_info (issue #881) if cpu_info is not None: - stats['cpu_name'] = cpu_info.get('brand', 'CPU') + # Use brand_raw if the key exist (issue #1685) + if cpu_info.get('brand_raw') is not None: + stats['cpu_name'] = cpu_info.get('brand_raw', 'CPU') + else: + stats['cpu_name'] = cpu_info.get('brand', 'CPU') if 'hz_actual_raw' in cpu_info: stats['cpu_hz_current'] = cpu_info['hz_actual_raw'][0] if 'hz_advertised_raw' in cpu_info: -- cgit v1.2.3