Get message from LogRecord with a method

Relates: https://pagure.io/releng/failed-composes/issue/469
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2019-11-08 15:24:15 +01:00
parent 6be2cf5118
commit 254d0cebff

View File

@ -137,7 +137,8 @@ class Compose(kobo.log.LoggingBase):
class ExcludingArchLogFilter(logging.Filter):
def filter(self, record):
if 'Populating package set for arch:' in record.message or \
message = record.getMessage()
if 'Populating package set for arch:' in message or \
(record.funcName and record.funcName == 'is_excluded'):
return True
else: