replace list comprehensions with generators (#23037)

old-commit-hash: 68c1a666a03a381768673a1b29a73f9131f0ed62
This commit is contained in:
grekiki
2021-11-26 00:53:11 +01:00
committed by GitHub
parent 757c7c74b2
commit 5b2511162a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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)