Skip to content

Commit d4f9303

Browse files
committed
Fix filter-log.py handling of suppressions
1 parent 72e9e03 commit d4f9303

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

lib/utils.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,21 @@ def filter_log_warnings(infile, outfile):
145145
patterns = [t[1] for t in parser.items('patterns', [])]
146146
patterns = [re.compile(p) for p in patterns]
147147

148+
def suppress(line):
149+
for suppression in suppressions:
150+
if suppression in line:
151+
return True
152+
153+
return False
154+
148155
found = False
149156
while True:
150157
line = infile.readline()
151158
if len(line) == 0:
152159
break
153160

154-
for suppression in suppressions:
155-
if suppression in line:
156-
continue
161+
if suppress(line):
162+
continue
157163

158164
for string in strings:
159165
if string in line:

0 commit comments

Comments
 (0)