jenkins-bot merged this change.

View Change

Approvals: Zhuyifei1999: Looks good to me, approved jenkins-bot: Verified
[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(-)

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:

To view, visit change 510687. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6186954414192cb51d1364eba780adbc14dc8d99
Gerrit-Change-Number: 510687
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Zhuyifei1999 <zhuyifei1999@gmail.com>
Gerrit-Reviewer: jenkins-bot (75)