Fix logger to follow "No % formatting operation is performed on msg when no args are supplied.".

This commit is contained in:
Chris Berkhout 2021-06-01 19:09:39 +02:00
parent 10982b72d4
commit e05cc1656c

View file

@ -4,7 +4,7 @@ import sys
class Formatter(logging.Formatter):
def format(self, record):
message = record.msg % record.args
message = record.msg % record.args if record.args else record.msg
if record.levelno == logging.INFO:
return message
else: