jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/436028 )
Change subject: cosmetic_changes.py: Do not convert text to byte string ......................................................................
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(-)
Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
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)
pywikibot-commits@lists.wikimedia.org