jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/510687 )
Change subject: [bugfix] fromlist identifiers must not be unicode in Python 2 ......................................................................
[bugfix] fromlist identifiers must not be unicode in Python 2
detached from I1d12bfa2
Change-Id: I6186954414192cb51d1364eba780adbc14dc8d99 --- M pywikibot/__init__.py 1 file changed, 2 insertions(+), 0 deletions(-)
Approvals: Zhuyifei1999: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index f032eb1..f7504d3 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -1256,6 +1256,8 @@
if not isinstance(interface, type): # If it isn't a class, assume it is a string + if PY2: # Must not be unicode in Python 2 + interface = str(interface) try: tmp = __import__('pywikibot.site', fromlist=[interface]) except ImportError:
pywikibot-commits@lists.wikimedia.org