From 8c9972c8d35c0a4a0a460d2552cda60a40ec7619 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Sun, 25 Apr 2021 02:44:52 +0200 Subject: [PATCH] Fixed: cpu frequency type change in psutil 5.8.1 --- bpytop.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bpytop.py b/bpytop.py index 410f4c2..1aaec38 100755 --- a/bpytop.py +++ b/bpytop.py @@ -3044,7 +3044,8 @@ class CpuCollector(Collector): del cls.cpu_usage[n][0] try: if hasattr(psutil.cpu_freq(), "current"): - cls.cpu_freq = round(psutil.cpu_freq().current) + freq: float = psutil.cpu_freq().current + cls.cpu_freq = round(freq * (1 if freq > 10 else 1000)) except Exception as e: if not cls.freq_error: cls.freq_error = True