diff --git a/teuthology/scrape.py b/teuthology/scrape.py
index c474931a9..42caf3a4a 100644
--- a/teuthology/scrape.py
+++ b/teuthology/scrape.py
@@ -411,8 +411,8 @@ def _get_service_types(self, job):
# Lines like:
# 2014-08-22T20:07:18.668 ERROR:tasks.ceph:saw valgrind issue Leak_DefinitelyLost in /var/log/ceph/valgrind/osd.3.log.gz
valgrind_err_line = grep(os.path.join(job.path, "teuthology.log"), " in ")
- valgrind_err_line = list(filter(None, valgrind_err_line)) # remove empty strings
- valgrind_err_line = [line for line in valgrind_err_line if line.strip()] # remove blank space
+ # removes blank space, empty string and None
+ valgrind_err_line = [line for line in valgrind_err_line if line and line.strip()]
for line in valgrind_err_line:
match = re.search("(.+) in .+/(.+)", line)
if not match: