jenkins-bot merged this change.
cosmetic_changes.py: Do not convert text to byte string
This may cause UnicodeEncodeError on Python 2. See
https://lists.wikimedia.org/pipermail/pywikibot/2018-May/009829.html.
Change-Id: I50bde45c7288b3e400bfd2d5c333206811527de6
---
M pywikibot/cosmetic_changes.py
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py
index 3975096..a01d7f2 100755
--- a/pywikibot/cosmetic_changes.py
+++ b/pywikibot/cosmetic_changes.py
@@ -659,7 +659,8 @@
for template in skip_templates[self.site.code]:
skip_regexes.append(
re.compile(r'\{\{\s*%s\s*\}\}' % template, re.I))
- stripped_text = str(text)
+
+ stripped_text = text
for reg in skip_regexes:
stripped_text = reg.sub(r'', stripped_text)
To view, visit change 436028. To unsubscribe, visit settings.