jenkins-bot submitted this change.
[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.