diff options
author | wu.zhihui <wu.zhihui1@zte.com.cn> | 2017-02-22 15:16:37 +0800 |
---|---|---|
committer | wu.zhihui <wu.zhihui1@zte.com.cn> | 2017-02-22 15:18:55 +0800 |
commit | 6ea605e02f00ce1987f5159a303ad134d7b10d21 (patch) | |
tree | 175d4f2723af72657a5faeff85abc06ce0880ad9 | |
parent | a72b8daa8aa00be9632d56ac0770002b0caad360 (diff) |
bugfix for grep
Change-Id: I1474a4e4f5884f17cbf3e6d62fae7e743921aae1
Signed-off-by: wu.zhihui <wu.zhihui1@zte.com.cn>
-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)) |