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

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/798498
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Idf9c7fc6b4fd0fdca1d0d25a71f1bdec91d3217d
Gerrit-Change-Number: 798498
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: DannyS712 <[email protected]>
Gerrit-Reviewer: Mpaa <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to