From 3ab7943f97d80984ed9e29aefeebaa3bf82deaef Mon Sep 17 00:00:00 2001 From: grekiki Date: Tue, 30 Nov 2021 14:15:42 +0100 Subject: [PATCH] Replace list by generator (#23077) old-commit-hash: 91f87e367527c607724711914142851bf0ea7238 --- selfdrive/debug/cpu_usage_stat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/debug/cpu_usage_stat.py b/selfdrive/debug/cpu_usage_stat.py index 8975b3e832..f9b57130b1 100755 --- a/selfdrive/debug/cpu_usage_stat.py +++ b/selfdrive/debug/cpu_usage_stat.py @@ -66,7 +66,7 @@ if __name__ == "__main__": for p in psutil.process_iter(): if p == psutil.Process(): continue - matched = any(l for l in p.cmdline() if any([pn for pn in monitored_proc_names if re.match(r'.*{}.*'.format(pn), l, re.M | re.I)])) + matched = any(l for l in p.cmdline() if any(pn for pn in monitored_proc_names if re.match(r'.*{}.*'.format(pn), l, re.M | re.I))) if matched: k = ' '.join(p.cmdline()) print('Add monitored proc:', k)