From 0115bb68f3a902966468629547e6a9a7c6b5c1ae Mon Sep 17 00:00:00 2001 From: RedBearAK <64876997+RedBearAK@users.noreply.github.com> Date: Sun, 23 Aug 2020 21:56:28 -0800 Subject: [PATCH] Clean excess whitespace from CPU model name Added one line to clean excess whitespace from the returned CPU model name, just before unnecessary patterns are removed and the name is returned. See issue #68 --- bpytop.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bpytop.py b/bpytop.py index c3cf9f2..8aaeec2 100755 --- a/bpytop.py +++ b/bpytop.py @@ -4095,6 +4095,8 @@ def get_cpu_name() -> str: elif "CPU" in name and not nlist[0] == "CPU": name = nlist[nlist.index("CPU")-1] + name = " ".join(name.split()) + return name.replace("Processor ", "").replace("CPU ", "").replace("(R)", "").replace("(TM)", "").replace("Intel ", "") def create_box(x: int = 0, y: int = 0, width: int = 0, height: int = 0, title: str = "", title2: str = "", line_color: Color = None, title_color: Color = None, fill: bool = True, box = None) -> str: