summaryrefslogtreecommitdiffstats
path: root/qtip/collector/parser/grep.py
diff options
context:
space:
mode:
Diffstat (limited to 'qtip/collector/parser/grep.py')
-rw-r--r--qtip/collector/parser/grep.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/qtip/collector/parser/grep.py b/qtip/collector/parser/grep.py
index d7ada485..c3274bc2 100644
--- a/qtip/collector/parser/grep.py
+++ b/qtip/collector/parser/grep.py
@@ -29,5 +29,6 @@ class GrepParser(BaseActor):
def grep_in_file(filename, regex):
- with open(filename, 'r') as f:
- return filter(lambda x: x is not None, [re.search(regex, line) for line in f])
+ with open(filename, "r") as outfile:
+ return filter(lambda x: x is not None,
+ list(re.finditer(regex, outfile.read(), re.MULTILINE)))