jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/798498 )
Change subject: [bugfix] Only remove color formats from strings ......................................................................
[bugfix] Only remove color formats from strings
Bug: T309086 Change-Id: Idf9c7fc6b4fd0fdca1d0d25a71f1bdec91d3217d --- M pywikibot/tools/_logging.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: DannyS712: Looks good to me, but someone else must approve Mpaa: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/tools/_logging.py b/pywikibot/tools/_logging.py index f499d9d..a82ae15 100644 --- a/pywikibot/tools/_logging.py +++ b/pywikibot/tools/_logging.py @@ -30,7 +30,7 @@ record.args = (msg,)
# remove color tags - if record.msg: + if record.msg and isinstance(record.msg, str): record.msg = new_colorTagR.sub('', record.msg)
return super().format(record).rstrip()
pywikibot-commits@lists.wikimedia.org