Change log-has to use record_tuples itself

This commit is contained in:
Matthias 2019-08-11 20:14:58 +02:00
parent 8ba7657007
commit a1b5c7242e
1 changed files with 2 additions and 2 deletions

View File

@ -29,13 +29,13 @@ def log_has(line, logs):
# caplog mocker returns log as a tuple: ('freqtrade.something', logging.WARNING, 'foobar')
# and we want to match line against foobar in the tuple
return reduce(lambda a, b: a or b,
filter(lambda x: x[2] == line, logs),
filter(lambda x: x[2] == line, logs.record_tuples),
False)
def log_has_re(line, logs):
return reduce(lambda a, b: a or b,
filter(lambda x: re.match(line, x[2]), logs),
filter(lambda x: re.match(line, x[2]), logs.record_tuples),
False)