Change log-has to use record_tuples itself
This commit is contained in:
parent
8ba7657007
commit
a1b5c7242e
@ -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)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user