jenkins-bot submitted this change.

View Change

Approvals: DannyS712: Looks good to me, but someone else must approve Mpaa: Looks good to me, approved jenkins-bot: Verified
[bugfix] Only remove color formats from strings

Bug: T309086
Change-Id: Idf9c7fc6b4fd0fdca1d0d25a71f1bdec91d3217d
---
M pywikibot/tools/_logging.py
1 file changed, 1 insertion(+), 1 deletion(-)

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()

To view, visit change 798498. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Idf9c7fc6b4fd0fdca1d0d25a71f1bdec91d3217d
Gerrit-Change-Number: 798498
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: DannyS712 <dannys712.wiki@gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki@gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged