From 1ed71cb4a90c635b1dfb2389c8c63134731fb6af Mon Sep 17 00:00:00 2001 From: andrew Date: Sun, 11 Jun 2023 03:59:08 -0400 Subject: [PATCH] Bugfix for py-cpuinfo with some CPUs and Py versions Python 3.11, on a 7B12, returns brand instead of brand_raw. Use this to ensure we don't error out, but also be resiliant to secondary definitions --- Client/Client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/Client.py b/Client/Client.py index 5cf3517..1122604 100644 --- a/Client/Client.py +++ b/Client/Client.py @@ -178,7 +178,7 @@ def scan_for_cpu_flags(data): # Set the CPU name which has to be done via global global SYSTEM_CPU_NAME, SYSTEM_CPU_FLAGS - SYSTEM_CPU_NAME = info['brand_raw'] + SYSTEM_CPU_NAME = info.get('brand_raw', info.get('brand', 'Unknown')) # This should cover virtually all compiler flags that we would care about desired = ['POPCNT', 'BMI2']