Fixed log warning detail.

Cases when % was in the string but not for C style.
This commit is contained in:
Salvador E. Tropea 2020-09-21 20:02:03 -03:00
parent 13c0216537
commit 7a7fc0a87d
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class MyLogger(logging.Logger):
def warning(self, msg, *args, **kwargs):
MyLogger.warn_tcnt += 1
if isinstance(msg, str):
if isinstance(msg, str) and len(args):
buf = StringIO()
buf.write(msg % args)
buf = buf.getvalue()