diff options
author | zhihui wu <wu.zhihui1@zte.com.cn> | 2017-02-22 09:05:52 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-02-22 09:05:52 +0000 |
commit | 452969c058a2f3f3327036b93cbc4bba4d7c574e (patch) | |
tree | f33bd3ba59a2e1edbf8b0719739116d5c14eb2d4 | |
parent | 9956e0aff54454f3cb78dd0e3e3cf18896a83328 (diff) | |
parent | 6ea605e02f00ce1987f5159a303ad134d7b10d21 (diff) |
Merge "bugfix for grep"
-rw-r--r-- | qtip/collector/parser/grep.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qtip/collector/parser/grep.py b/qtip/collector/parser/grep.py index c3274bc2..f74ce403 100644 --- a/qtip/collector/parser/grep.py +++ b/qtip/collector/parser/grep.py @@ -29,6 +29,6 @@ class GrepParser(BaseActor): def grep_in_file(filename, regex): - with open(filename, "r") as outfile: + with open(filename, 'r') as f: return filter(lambda x: x is not None, - list(re.finditer(regex, outfile.read(), re.MULTILINE))) + re.finditer(regex, f.read(), re.MULTILINE)) |