From f867c86fdb80d7a5aac8c41fa02ee283b2204470 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Wed, 12 Aug 2020 16:30:27 +0200 Subject: [PATCH] Fixed cpu usage bug when showing tree and memory in percent --- bpytop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bpytop.py b/bpytop.py index 7e60b1e..66f5a7b 100755 --- a/bpytop.py +++ b/bpytop.py @@ -3087,7 +3087,7 @@ class ProcCollector(Collector): infolist: Dict = {} tree = defaultdict(list) n: int = 0 - for p in sorted(psutil.process_iter(cls.p_values + ["memory_info"] if CONFIG.proc_mem_bytes else [], err), key=lambda p: eval(sort_cmd), reverse=reverse): + for p in sorted(psutil.process_iter(cls.p_values + (["memory_info"] if CONFIG.proc_mem_bytes else []), err), key=lambda p: eval(sort_cmd), reverse=reverse): if cls.collect_interrupt: return try: tree[p.ppid()].append(p.pid)