about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBenjamin Morrison <ben@gbmor.dev>2020-07-26 15:58:17 -0400
committerBenjamin Morrison <ben@gbmor.dev>2020-07-26 15:58:17 -0400
commit91ef9be93d6556266ef3ec34f9b52ed142052a40 (patch)
treed7d97eb6b48c7566acd142a4ee26795cec678b9b
parent88675e7b8833fb4d4967583ac029901633794474 (diff)
downloadadmin-91ef9be93d6556266ef3ec34f9b52ed142052a40.tar.gz
reduce .lower() calls significantly
-rwxr-xr-xbin/badprocs.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/badprocs.py b/bin/badprocs.py
index b4e3225..863e365 100755
--- a/bin/badprocs.py
+++ b/bin/badprocs.py
@@ -18,8 +18,9 @@ def getBadProcs(procsList):
     )
 
     for proc in procsRunning:
+        lilproc = proc.lower()
         for badproc in procsList:
-            if badproc in proc.lower():
+            if badproc in lilproc:
                 procsFound.append("Found {0} :: {1}".format(badproc, proc))
 
     return procsFound