jenkins-bot has submitted this change and it was merged.
Change subject: Do not decode docstring when it is already unicode. ......................................................................
Do not decode docstring when it is already unicode.
Bug was established with Ic5a25fac9592fead9a6d8b0748bf13947ef7f2c7
Bug: T78519 Change-Id: Ia7beef2f8111f8a76c2241b88048f4cc62eb9cd9 --- M pywikibot/bot.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/bot.py b/pywikibot/bot.py index 8643081..ddfbbc9 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -834,7 +834,7 @@ try: module = __import__('%s' % module_name) helpText = module.__doc__ - if sys.version_info[0] < 3: + if sys.version_info[0] < 3 and isinstance(helpText, str): helpText = helpText.decode('utf-8') if hasattr(module, 'docuReplacements'): for key, value in module.docuReplacements.items():
pywikibot-commits@lists.wikimedia.org