From 4a654a063f61cd230547f5d40e06277f41d3ae5b Mon Sep 17 00:00:00 2001 From: Pradyumn Rahar Date: Thu, 2 Nov 2023 14:33:38 +0530 Subject: [PATCH] Remove whitespace padding Signed-off-by: Pradyumn Rahar --- drgn_tools/cpuinfo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drgn_tools/cpuinfo.py b/drgn_tools/cpuinfo.py index d6f22317..6889f9c5 100644 --- a/drgn_tools/cpuinfo.py +++ b/drgn_tools/cpuinfo.py @@ -67,8 +67,8 @@ def x86_get_cpu_info(prog: Program) -> Dict[str, Any]: "Failed to load CPU info: no cpuinfo struct found (tried 'cpu_data' and 'boot_cpu_data')" ) - cpu_vendor = cpuinfo_struct.x86_vendor_id.string_().decode("utf-8") - model_name = cpuinfo_struct.x86_model_id.string_().decode("utf-8") + cpu_vendor = cpuinfo_struct.x86_vendor_id.string_().decode("utf-8").strip() + model_name = cpuinfo_struct.x86_model_id.string_().decode("utf-8").strip() cpu_family = int(cpuinfo_struct.x86) cpus_numa0 = "0-" + str(cpus - 1) microcode = hex(cpuinfo_struct.microcode)